Code : Tout sélectionner
#Region ;**** Directives created by AutoIt3Wrapper_GUI ****
#AutoIt3Wrapper_UseX64=n
#EndRegion ;**** Directives created by AutoIt3Wrapper_GUI ****
#include <ButtonConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <GuiToolbar.au3>
#include <StaticConstants.au3>
#include <TabConstants.au3>
#include <ToolbarConstants.au3>
#include <WindowsConstants.au3>
$Ext = ".pdf"
$Chemin = "Dossier et repertoire de mes fichier PDF"
Opt("GUIOnEventMode", 1)
$dlgTabbed = GUICreate("..:: Launcher ::..", 332, 565, -1, -1)
GUISetIcon("", -1)
GUISetFont(9, 400, 0, "MS Sans Serif")
$PageControl1 = GUICtrlCreateTab(0, 0, 331, 564)
$TabSheet1 = GUICtrlCreateTabItem("TAB01")
$Label1 = GUICtrlCreateLabel(" ..::xxxxxxx ::..", 4, 161, 112, 20, BitOR($SS_CENTER,$SS_CENTERIMAGE), BitOR($WS_EX_STATICEDGE,$GUI_WS_EX_PARENTDRAG))
GUICtrlSetFont(-1, 10, 800, 0, "Arial")
GUICtrlSetColor(-1, 0xFFFBF0)
GUICtrlSetBkColor(-1, 0x808080)
$Label2 = GUICtrlCreateLabel(" ..:: xxxxx ::..", 4, 31, 112, 20, BitOR($SS_CENTER,$SS_CENTERIMAGE))
GUICtrlSetFont(-1, 10, 800, 0, "Arial")
GUICtrlSetColor(-1, 0xFFFFFF)
GUICtrlSetBkColor(-1, 0x808080)
$PPLEINECRAN = GUICtrlCreateButton("xxxx", 8, 64, 129, 33)
GUICtrlSetFont(-1, 8, 800, 0, "Arial")
NETTOYAGE DU CODE XXXXXXXX
GUICtrlSetFont(-1, 10, 800, 0, "Arial")
GUICtrlSetFont(-1, 8, 800, 0, "Arial")
$TabSheet3 = GUICtrlCreateTabItem("TAB03")
$INPUT1 = GUICtrlCreateInput("xxx", 48, 112, 249, 27, BitOR($GUI_SS_DEFAULT_INPUT,$ES_CENTER,$ES_NUMBER,$WS_BORDER), BitOR($WS_EX_CLIENTEDGE,$WS_EX_STATICEDGE))
GUICtrlSetFont(-1, 12, 800, 0, "Arial")
GUICtrlSetColor(-1, 0x800080)
$BUTTON1 = GUICtrlCreateButton("Rechercher la xxxxxxxxxv...", 80, 160, 185, 49)
GUICtrlSetFont(-1, 8, 800, 0, "Arial")
$Label4 = GUICtrlCreateLabel("xxx", 16, 64, 311, 18)
GUICtrlSetFont(-1, 8, 400, 2, "Arial")
$TabSheet4 = GUICtrlCreateTabItem("TAB04")
$Pic3 = GUICtrlCreatePic("img\ico\word.jpg", 66, 56, 40, 40)
$Pic4 = GUICtrlCreatePic("img\ico\excel.jpg", 149, 60, 40, 40)
$Pic5 = GUICtrlCreatePic("img\ico\oowriter.jpg", 233, 57, 40, 40)
$Pic6 = GUICtrlCreatePic("img\ico\firefox.jpg", 69, 125, 40, 40)
$Pic7 = GUICtrlCreatePic("img\ico\skype.jpg", 237, 124, 40, 40)
$TabSheet5 = GUICtrlCreateTabItem("Note")
GUICtrlCreateEdit("", 16, 32, 313, 273)
GUICtrlSetData(-1, "")
GUICtrlSetFont(-1, 9, 800, 0, "MS Sans Serif")
$ToolBar1 = _GUICtrlToolbar_Create($dlgTabbed, 0)
$Input2 = GUICtrlCreateInput("", 12, 345, 97, 21)
GUICtrlSetFont(-1, 8, 800, 0, "MS Sans Serif")
$Input3 = GUICtrlCreateInput("", 12, 369, 97, 21)
NETTOYAGE DU CODE XXXXXXXX
$Label5 = GUICtrlCreateLabel("xxxxxxxxxxxx", 8, 320, 138, 17, $SS_CENTER)
GUICtrlSetFont(-1, 8, 800, 0, "MS Sans Serif")
GUICtrlCreateTabItem("")
GUICtrlSetCursor (-1, 2)
GUISetState(@SW_SHOW)
GUICtrlSetState($BUTTON1, $GUI_DEFBUTTON)
GUISetState(@SW_SHOW)
GUICtrlSetOnEvent($BUTTON1, "PromSearch")
GUISetOnEvent($GUI_EVENT_CLOSE, "PromSearchClose")
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $PPLEINECRAN
Run("xxxxxx")
///// J'ai enlever les "Case $XX" pour que le code soit moins long
Case $GUI_EVENT_CLOSE
Exit
EndSwitch
WEnd
Func PromSearch()
$INPUTT = StringSplit(GUICtrlRead($INPUT1), ' ')
$SEARCH = ''
$INPUTT2 = $INPUTT[0] - 1
For $I = $INPUTT2 To 0 Step -1
$TEMP = $INPUTT[0] - $I
$SEARCH &= $INPUTT[$TEMP]
Next
$FINAL = $Chemin& $SEARCH & $Ext
ShellExecute($FINAL)
EndFunc ;==>PromSearch
Func PromSearchClose()
Select
Case @GUI_CtrlId = $GUI_EVENT_CLOSE
Exit
EndSelect
EndFunc ;==>PromSearchClose