Reply to topic

Scripting an application
Richard Palmino


Joined: 01 Jan 2007
Posts: 2
Reply with quote
We downloaded Gizmo Script and have attempted to script an application. None of the documentation have examples on what we need to use. I need some examples on connecting to a database. Actually we are trying to connect to MDB file that is a Microsoft Access database. Can this be done? Thank you.
View user's profileSend private message
Logan Mueller
Support

Joined: 16 Nov 2003
Posts: 565
Reply with quote
Hi Richard,

Use an OLE DB connection string for Microsoft Jet. It'll let you work with Microsoft Access MDB file. Here is an example:

Code:

String strMDBFile = "MyMDBFile.mdb";
String strConn = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" +
     strMDBFile + ";User Id=admin;Password=;";

Database db;
db.Set(strConn);
db.Query("SELECT * FROM MyTable");

String strResult;

for (int idxRow = 1; idxRow <= db.GetRowCount(); idxRow++)
{
     strResult = strResult + db.GetString(idxRow, 1) + "\n";
}

Window.MsgBox(strResult);

_________________
Support is provided as a convenience to our users. We make no guarantees in the timeliness and accuracy in our responses. We reserve the right to refuse service to anyone.
View user's profileSend private messageVisit poster's website
Richard Palmino


Joined: 01 Jan 2007
Posts: 2
Reply with quote
Excellent. Next we want to go through the application. I see there is documentation for Mouse and Keyboard class, but isn't there a way to record what I am doing instead of typing each coordinate by hand? What does CodeClick() do? It accepts GizmoID but I'm not sure what that is.
View user's profileSend private message
Logan Mueller
Support

Joined: 16 Nov 2003
Posts: 565
Reply with quote
Sadly, there is no way to record keystrokes/mouse clicks with the current version. This would probably be a perfect time to start working on a feature like that, finally having the foundation for Gizmo Script in place.

GizmoID is another mechanism for identifying windows. You can get this ID using Window Analyzer. Press F4 in the script editor to bring this up. It's an alternative to using Window Text or Window Class.

_________________
Support is provided as a convenience to our users. We make no guarantees in the timeliness and accuracy in our responses. We reserve the right to refuse service to anyone.
View user's profileSend private messageVisit poster's website
Scripting an application
All times are GMT - 8 Hours  
Page 1 of 1  

  
  

 Reply to topic