annelinn Posted April 22, 2009 Share Posted April 22, 2009 I want the script to check if there are any other copies of it running at the moment. ; Load all windows into a variable $winlist = WinList() ; Check each window to see if it is an instance of MyScript $count = 0 For $a = 1 to $winlist[0][0] If StringLeft($winlist[$a][0], 8) = "MyScript" Then $count = $count + 1 EndIf NextAll well and good, but the code detects both the window "MyScript.exe" and the folder where it lives, "MyScript", when the folder is open. This is potentially bad. What's the procedure for checking if a window is a folder, or not? Link to comment Share on other sites More sharing options...
rajeshontheweb Posted April 22, 2009 Share Posted April 22, 2009 thats always one of the concerns i've had for using window titles. there was a few stuff about CLASS names in help file AU3Info tool with the AutoIT3.chm might be of lot of help Started late is much better than having never started it!!!!Failure is another step towards success. I've been messing around with: Adding Entry to 'Hosts'File Information Lister (Logger)Yet Another AutoIT Error Handler Yet Another AutoIT Error Handler & Debugger Control your App's TaskBar Button YCurrency Ticker (Latest Release : 16 Apr 2009)_WinInetInternetCheckConnection UDF Symantec Definitions Lister UDF _GetLocalIPAddresses UDF UDF to get Special Folder Information WMI_NetworkAdapterConfiguration2Array WMI_CDRomDriveCapabilities _ScriptExists - Check if your au3 script is running!! Uninstaller UDF Get Version for your application (at script level or compiled stage) Uninstaller Pro - faster alternative to windows application removal applet Link to comment Share on other sites More sharing options...
WideBoyDixon Posted April 22, 2009 Share Posted April 22, 2009 ProcessList() [center]Wide by name, Wide by nature and Wide by girth[u]Scripts[/u]{Hot Folders} {Screen Calipers} {Screen Crosshairs} {Cross-Process Subclassing} {GDI+ Clock} {ASCII Art Signatures}{Another GDI+ Clock} {Desktop Goldfish} {Game of Life} {3D Pie Chart} {Stock Tracker}[u]UDFs[/u]{_FileReplaceText} {_ArrayCompare} {_ToBase}~ My Scripts On Google Code ~[/center] Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now