PDA

View Full Version : Changing Pointers


FlyBoy
09-25-2009, 12:15 PM
There is a section during the install where I'm running SQL scripts to update a local database file. The scripts run silently so no GUI or message is shown. I'm using the On Preload event of the Finished Install window. This script can sometimes take a little time to run so to inform the user that the install is still running I'm poping up a Dialog.TimedMessage window before I start the SQL scripts. But when it goes a way all the user sees is the background for some time

Is there a way to change the mouse pointer to an hourglass so the user still knows the process is running or leave a Dialog of somekind while the script is running... I'm looking for a more elegant way to do this. Thanks for any help.

-----------------------
On Preload
if(SessionVar.Expand("%RadioSelectionKeepDB%") == "604") then
-- Synch the DB
Dialog.TimedMessage("Synchronizing Database","Updating the Existing database. Please Wait for install to complete...",4500);
g_SynchDB();
end

-------------------------
function g_SynchDB()
-- Dialog.Message("","Running Synch Script");
local sTargetDB = SessionVar.Expand("%AppFolder%").."\\sweet.db";
local sTargetSQL = File.GetShortName(SessionVar.Expand("%AppFolder%").."\\prodchg.sql");
local sArgs = "-q -c \"UID=Wizard;PWD=pass;DBF="..sTargetDB.."\" read "..sTargetSQL;
-- Dialog.Message("RunString",sArgs);
File.Run(SessionVar.Expand("%AppFolder%").."\\dbisqlc.exe",sArgs,"",SW_SHOWNORMAL,true);

end

Ulrich
09-25-2009, 12:23 PM
Hello,

you can use the StatusDlg actions to display a message and hide it when the task is over.

To change the cursor, look for methods here:
Cursor Actions plugin (http://www.indigorose.com/forums/showthread.php?t=27701)
Changing cursor between screens (http://www.indigorose.com/forums/showthread.php?p=133046)

Ulrich

FlyBoy
09-26-2009, 01:28 PM
Sweet... thanks for the tip.