janus96 Posted October 3, 2007 Share Posted October 3, 2007 Hi, What is AutoIt's ProgID, the string which is the name of the control? I haven't been able to find it here. This is a great product, and the help and support I found here is real nice. Many thanks. janus Link to comment Share on other sites More sharing options...
Blue_Drache Posted October 3, 2007 Share Posted October 3, 2007 (edited) The question is irrelevant. The Program ID is variable. As to how you get it, that's a different ball of wax. 14. How can I make sure only one copy of my script is run? The easiest way is to rename the title of the hidden AutoIt window when your script first starts. Then in the same script check for that window title existing - if it does then another copy of the script is running. ; Place at the top of your script $g_szVersion = "My Script 1.1" If WinExists($g_szVersion) Then Exit ; It's already running AutoItWinSetTitle($g_szVersion) ; Rest of your script goes here The clue is in the FAQ, question 14. Also ... AutoItWinGetTitle() Edited October 3, 2007 by Blue_Drache Lofting the cyberwinds on teknoleather wings, I am...The Blue Drache Link to comment Share on other sites More sharing options...
Uten Posted October 3, 2007 Share Posted October 3, 2007 Using a mutex is probably a lot safer (if your really want only one occurence of your prog. runnig). Search scripts to find sample usage. Please keep your sig. small! Use the help file. Search the forum. Then ask unresolved questions :) Script plugin demo, Simple Trace udf, TrayMenuEx udf, IOChatter demo, freebasic multithreaded dll sample, PostMessage, Aspell, Code profiling Link to comment Share on other sites More sharing options...
janus96 Posted October 3, 2007 Author Share Posted October 3, 2007 Thank you all very much. :-) Link to comment Share on other sites More sharing options...
martin Posted October 3, 2007 Share Posted October 3, 2007 Thank you all very much. :-)I don't see how the original question was translated into "How do I run one instance?" .Since janus was happy with the answers I suppose I shouldn't worry, bit in case the PID is what's wanted then look up ProcessList. Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script. Link to comment Share on other sites More sharing options...
SandelPerieanu Posted October 3, 2007 Share Posted October 3, 2007 I don't see how the original question was translated into "How do I run one instance?" . Since janus was happy with the answers I suppose I shouldn't worry, bit in case the PID is what's wanted then look up ProcessList. try #Include <Misc.au3> _Singleton($sOccurenceName[, $iFlag = 0]) from help Link to comment Share on other sites More sharing options...
janus96 Posted October 5, 2007 Author Share Posted October 5, 2007 What is AutoIt's ProgID, the string which is the name of the control? I haven't been able to find it here.Thank you all for your help, but I've not been able to find the answer to the original question. ProcessList() would return the ProcessID, or PID as it is called in the documentation. However, this is not ProgID. I've looked at the _Singleton function in Misc.au3, but it doesn't look like it would provide the information needed.Maybe I didn't phrase the question adequately. ProgID, or Programmatic IDentifier, is a COM identifier published by the vendor. To use AutoIt as a COM in another program, it is nessary to know AutoIt's ProgID so that it can be instanciated. It is similar to ClassName. For example, in$oRemoteMedia = ObjCreate("MediaPlayer.MediaPlayer.1","name-of-remote-computer")"MediaPlayer.MediaPlayer.1" is a ProgID of Windows Media Player ActiveX.I wonder if anyone has done instancig AutoIt as an ActiveX control? I know that ActiveItX would be a better forum, but if you can help I'd appreciate it. Thanks. Link to comment Share on other sites More sharing options...
Uten Posted October 5, 2007 Share Posted October 5, 2007 ROLF, ROLF, ROLF What is the progID of notepad.exe?.. Please keep your sig. small! Use the help file. Search the forum. Then ask unresolved questions :) Script plugin demo, Simple Trace udf, TrayMenuEx udf, IOChatter demo, freebasic multithreaded dll sample, PostMessage, Aspell, Code profiling Link to comment Share on other sites More sharing options...
Blue_Drache Posted October 5, 2007 Share Posted October 5, 2007 Ah, you mean for the AutoitX.dll? Start-->Programs-->AutoIt-->Extras-->AutoItX-->AutoItX Help Read it, Wrote it! Lofting the cyberwinds on teknoleather wings, I am...The Blue Drache 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