Code : Tout sélectionner
#NoTrayIcon
#include <ButtonConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#include <GUIConstantsEx.au3>
#include <ComboConstants.au3>
#Include <GuiComboBox.au3>
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
#Region ### START Koda GUI section ### Form=
$Pic1 = GUICtrlCreatePic("C:\Users\C3D\Desktop\loupe.gif", 88, 40, 97, 89, BitOR($SS_NOTIFY,$WS_GROUP,$WS_CLIPSIBLINGS))
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
Dim $aForumName [6] = ["Tous les Forums", "01", "02", "03", "04", "05"]
Dim $aForumIndex [6] = [0, 13, 42, 60, 69, 68]
Dim $iComboIndex
$Rech1 = "&terms=all&author=&fid[]="
Opt("GUIOnEventMode", 1)
#Region ### START Koda GUI section ### Form=
$FORM1 = GUICreate(".: xxxxxx ::..", 380, 100, 595, 479, -1, BitOR($WS_EX_TOOLWINDOW, $WS_EX_TOPMOST, $WS_EX_WINDOWEDGE))
$INPUT1 = GUICtrlCreateInput('Votre recherche ici ...', 8, 15, 217, 21, BitOR($ES_CENTER, $ES_AUTOHSCROLL))
$BUTTON1 = GUICtrlCreateButton("Rechercher sur VOTRE FORUM", 40, 60, 290, 25, 0)
$COMBO1 = GUICtrlCreateCombo($aForumName[0], 240, 30, 120, 40, $CBS_DROPDOWNLIST)
Local $Vartmp
; Boucle pour mettre le nom des forums dans une variable qui sera affectée au combo (L'index 0 à déjà été attribué ;) ).
For $a = 1 to Ubound($aForumName) - 1
$Vartmp &= $aForumName[$a] & '|'
Next
$Vartmp = StringTrimRight($Vartmp, 1) ; Ceci permet de supprimer le dernier caractère de la chaine ('|')
$COMBO2 = GUICtrlSetData($COMBO1, $Vartmp)
$COMBO3 = GUICtrlCreateCombo("", 240, 2, 120, 40, $CBS_DROPDOWNLIST)
$COMBO4 = GUICtrlSetData(-1, " [XXX] | [XXX] ] | [XXX] ] | [XXX] ] | [XXX] ] ")
GUICtrlSetState($BUTTON1, $GUI_DEFBUTTON)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
GUICtrlSetOnEvent($BUTTON1, "DPSearch")
GUICtrlSetOnEvent($COMBO1, "ComboSelect")
GUISetOnEvent($GUI_EVENT_CLOSE, "DPSearchClose")
Func DPSearch()
Local $Forum = "http://VOTREFORUM.com/forum/search.php?keywords="
Local $ForumName = $aForumName[$iComboIndex]
Local $ForumIndex = $aForumIndex[$iComboIndex]
$INPUTT = StringSplit(GUICtrlRead($INPUT1), ' ')
$SEARCH = ''
$SEARCH2 = '++'
$INPUTT2 = $INPUTT[0] - 1
For $I = $INPUTT2 To 0 Step -1
$TEMP = $INPUTT[0] - $I
$SEARCH &= $INPUTT[$TEMP]
If $I <> 0 Then $SEARCH &= '+'
Next
$FINAL = $Forum & $SEARCH & GUICtrlRead($COMBO3) & $Rech1 & $ForumIndex ; Cette ligne est à mettre comme il faut selon vos besoins.
ShellExecute($FINAL)
EndFunc ;==>DPSearch
Func DPSearchClose()
Select
Case @GUI_CtrlId = $GUI_EVENT_CLOSE
Exit
EndSelect
EndFunc ;==>DPSearchClose
Func ComboSelect()
; Attribue l'index de la sélection à la variable $iComboIndex qui est déclarée globalement.
$iComboIndex = _GUICtrlComboBox_GetCurSel($COMBO1)
EndFunc
While 1
Sleep(1000) ; Innutile de faire une pause trop longue (1 seconde suffit)
WEnd