Jump to content
LordJashin

OSI New Logging System & Client functions

Recommended Posts

All the WriteLn's have now been changed to the new OSI_WriteAndLog procedure.

 

New variables:

 

OSI_Log : TStrArray (OSI_WriteAndLog, WriteLn's the text put into it, then adds it to this array)

OSI_AutoLog : Boolean (Enable autologging for your script. Logs will be saved to LogsPath)

OSI_AutoLogName : string (Name your autolog, good just in case you are running multiple scripts and don't want things to be mixed up or overwritten)

IsOSISetup : Boolean (Will be set to true, if you run SetupOSI)

 

Most of OSI now is in try..except..finally blocks, and overall runs a lot better.

 

New Logging Functions in Divi\Misc\Logging.scar:

 

procedure OSI_WriteAndLog(s: string);

procedure OSI_ClearLog;

function OSI_SaveLog(Path: string): Boolean;

 

New Client Functions in Divi\Client.scar:

 

function FindWindowEx(Title: string, CaseSensitive, PartialMatch: Boolean): HWND;

function SetClientBox(Client: TSCARClient; cX1, cY1, cX2, cY2: Integer): Boolean;

procedure SCARSetCaption(Title: string);

procedure SCARMoveToTray;

procedure SCARMinimize;

procedure SCARMaximize;

procedure SCARHide;

procedure SCARShow;

procedure SCARSetEnabled(Enabled: Boolean);

function SCARHandle: HWND;

 

All the SCAR functions are utilizing the GetSelf object.

SetClientBox will set a clients ImageArea and Input Area to cX1, etc.

FindWindowEx is like the old FindWindowTitlePart.

It will Find a window by its title, casesensitivity, and partialMatch of the title.

It returns the Handle of the window if it finds one.

So you can do now: ActivateWindow(FindWindowEx('Notepad', false, True));

 

Enjoy :D

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



×
  • Create New...