Jump to content

Context Menu


Digisoul
 Share

Recommended Posts

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

Link to comment
Share on other sites

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 by BrettF
Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...