I need your knowledge!
My encryption software makes ".mkey2" files
So I said windows it launches my encryptor when we double click on a .mkey2 file
What I would like is that my cryptor opens on the path of the double clicked file (ExplorerTreeGadget)!
Here is a short code that can be considered as my software:
Code: Select all
OpenWindow(0, 0, 0, 749, 515, "SPH", #PB_Window_SystemMenu | #PB_Window_ScreenCentered)
Global Repertoire$
calcul=0
ExplorerTreeGadget(1, 11, 73, 230, 280, Repertoire$, #PB_Explorer_NoFiles)
ExplorerListGadget(2, 247,73,490,280, "*.*", #PB_Explorer_NoFolders|#PB_Explorer_NoParentFolder)
SendMessage_(GadgetID(2),#LVM_SETCOLUMNWIDTH,0,188) ; largeur colonne
SendMessage_(GadgetID(2),#LVM_SETCOLUMNWIDTH,1,80) ; largeur colonne
FrameGadget(3, 11, 360, 726,33, "", #PB_Frame_Single)
;titre
TextGadget(4, 20, 370,90,20,"Password :")
;password
StringGadget(5, 80, 366, 570, 20, "" )
;invisible
ButtonGadget(6, 656, 366, 30, 20, "Hide", #PB_Button_Toggle)
;cls
ButtonGadget(7, 693, 366, 40, 20, "Clear")
Procedure Afficher_fichiers()
SetGadgetText(2, "") ; Vider la liste des fichiers
Repertoire$ = GetGadgetText(1) ; Voir quel est le répertoire sélectionné
SetGadgetText(2, Repertoire$) ; Remplir la liste avec le répertoire
EndProcedure
BindGadgetEvent(1, @Afficher_fichiers(), #PB_EventType_Change) ; #PB_EventType_LeftClick)
Repeat
Evenement = WindowEvent()
If Evenement = #PB_Event_Gadget
If EventGadget()=6 ; hide button
If GetGadgetState(6)=1
StringGadget(5, 80, 366, 570, 20, GetGadgetText(5),#PB_String_Password)
Else
StringGadget(5, 80, 366, 570, 20, GetGadgetText(5))
EndIf
EndIf
window_event = WaitWindowEvent(5) ;changing the progressbar's will always cause this to catch an event
While window_event <> 0
If window_event = #PB_Event_CloseWindow : Break 2: EndIf
window_event = WindowEvent()
Wend
EndIf
Delay(5)
Until Evenement = #PB_Event_CloseWindow
End
;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;