Digisoul Posted September 1, 2008 Posted September 1, 2008 Hi There, my application enable user to change the icon of any folder, by right clicking to any folder & select my app. I add my app on folders context menu by registry entry. for that i m using $CMDLINERAW for getting the path of folder. now problem is that if user select any two forlders its execute my programs two times. I want that if any user select any 2 folders and then right click on them & pass my application. The application should return both paths of selected folders ? but my program return ony 1 path for 1 time. Hope so you guys understand what I want. 73 108 111 118 101 65 117 116 111 105 116
BrettF Posted September 1, 2008 Posted September 1, 2008 (edited) Hi there, I came up with the following solution. It worked well with opening another instance, but I am unsure with how it will handle with multiple instances. I chose to use _Singleton() and send text to a hidden text control, and polling if the text in the control had changed. I hope it will help you to finding a proper solution. #include "Misc.au3" #include <GUIConstantsEx.au3> $val = "Text to pass to other app" If _Singleton("TEST", 1) = 0 Then $val = ControlGetText ("AForm1", "", "[CLASS:Edit; INSTANCE:4]") & $val & "|" ControlSetText ("AForm1", "", "[CLASS:Edit; INSTANCE:4]", $val) Exit EndIf $Form1 = GUICreate("AForm1", 373, 164, 193, 115) $Input1 = GUICtrlCreateInput("AInput1", 8, 8, 361, 21) $Edit1 = GUICtrlCreateEdit("", 8, 40, 185, 89) GUICtrlSetData(-1, "I added these random controls.... =]") $List1 = GUICtrlCreateList("", 200, 40, 161, 110) $Combo1 = GUICtrlCreateCombo("ACombo1", 8, 136, 185, 25) $Test_In = GUICtrlCreateInput("", -100, -100, 121, 21) GUISetState(@SW_SHOW) Sleep (1000) While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit EndSwitch If GUICtrlRead ($Test_In) <> "" Then MsgBox (0, "", GUICtrlRead ($Test_In)) GUICtrlSetData ($Test_In, "") EndIf WEnd Cheers, Brett EDIT: Codebox Edited September 1, 2008 by BrettF Vist my blog!UDFs: Opens The Default Mail Client | _LoginBox | Convert Reg to AU3 | BASS.au3 (BASS.dll) (Includes various BASS Libraries) | MultiLang.au3 (Multi-Language GUIs!)Example Scripts: Computer Info Telnet Server | "Secure" HTTP Server (Based on Manadar's Server)Software: AAMP- Advanced AutoIt Media Player | WorldCam | AYTU - Youtube Uploader Tutorials: Learning to Script with AutoIt V3Projects (Hardware + AutoIt): ArduinoUseful Links: AutoIt 1-2-3 | The AutoIt Downloads Section: | SciTE4AutoIt3 Full Version!
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