► Afficher le texte
Code : Tout sélectionner
Func _tooltip($x1,$x2,$y1,$y2,$texteaff,$guinom)
$tabFenetre = WinGetPos($guinom)
$pos = GUIGetCursorInfo ()
$x = $pos[0]
$y = $pos[1]
If $y >= $y1 And $y <= $y2 Then
If $x >= $x1 And $x <= $x2 Then
ToolTip($texteaff, $x + 12 + $tabFenetre[0], $y + 50 + $tabFenetre[1])
EndIf
Else
ToolTip ("")
EndIf
endfunc Merci de vos réponse pour me sortir de làSubscript used with non-Array variable.:
$x = $pos[0]
$x = $pos^ ERROR
Voila le reste du code :
► Afficher le texte
Code : Tout sélectionner
#include <ButtonConstants.au3>
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
Dim $img = "\google.jpg"
FileInstall ("google.jpg","\google.jpg",1)
Dim $img2 = "\au3.jpg"
FileInstall ("au3.jpg","\au3.jpg",1)
AdlibEnable ("_hms",1000)
_hms ()
#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("SAE", 623, 386, 135, 124)
$Group1 = GUICtrlCreateGroup("Options", 8, 24, 257, 201)
$Checkbox1 = GUICtrlCreateCheckbox("Checkbox1", 16, 56, 17, 17)
$Radio1 = GUICtrlCreateRadio("Radio1", 96, 56, 17, 17)
$Radio2 = GUICtrlCreateRadio("Radio2", 96, 80, 17, 17)
$Radio3 = GUICtrlCreateRadio("Radio3", 96, 104, 17, 17)
$Radio4 = GUICtrlCreateRadio("Radio4", 96, 128, 17, 17)
$Radio5 = GUICtrlCreateRadio("Radio5", 96, 152, 17, 17)
$Radio6 = GUICtrlCreateRadio("Radio6", 96, 176, 17, 17)
$Radio7 = GUICtrlCreateRadio("Radio7", 96, 200, 17, 17)
$Label1 = GUICtrlCreateLabel("Aide générale", 112, 56, 148, 17)
$Label2 = GUICtrlCreateLabel("Interface Utilisateur (GUI)", 112, 80, 148, 17)
$Label3 = GUICtrlCreateLabel("Active X/COM", 112, 104, 148, 17)
$Label4 = GUICtrlCreateLabel("Exemple de script", 112, 128, 148, 17)
$Label5 = GUICtrlCreateLabel("Fonction et UDF", 112, 152, 148, 17)
$Label6 = GUICtrlCreateLabel("Demande création de Scripts", 112, 176, 148, 17)
$Label7 = GUICtrlCreateLabel("Menu Principal", 112, 200, 148, 17)
$Label8 = GUICtrlCreateLabel("Rechercher", 32, 56, 60, 17)
GUICtrlCreateGroup("", -99, -99, 1, 1)
$Button1 = GUICtrlCreateButton("Go Autoit france", 336, 24, 193, 49, 0)
$Pic1 = GUICtrlCreatePic($img, 350, 150, 150, 100, BitOR($SS_NOTIFY,$WS_GROUP,$WS_CLIPSIBLINGS))
$Pic2 = GUICtrlCreatePic ($img2,150,304,50,50)
$Label9 = GUICtrlCreateLabel("Créé par guitarist", 8, 304, 100, 65)
GUICtrlSetBkColor ($Button1,0x00CBFE)
GUISetState(@SW_SHOW)
GUISetBkColor (35421)
#EndRegion ### END Koda GUI section ###
While 1
_tooltip (350,500,150,250,"Cliquez pour lancer Google","SAE")
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
EndSwitch
Select
Case $nMsg = $button1 And _IsChecked ($Radio1)
ShellExecute ("http://www.autoitscript.fr/forum/viewforum.php?f=3")
Case $nMsg = $button1 And _IsChecked ($Radio7)
ShellExecute ("http://www.autoitscript.fr/forum/index.php")
Case $nMsg = $button1 And _IsChecked ($Radio2)
ShellExecute ("http://www.autoitscript.fr/forum/viewforum.php?f=4")
Case $nMsg = $button1 And _IsChecked ($Radio3)
ShellExecute ("http://www.autoitscript.fr/forum/viewforum.php?f=5")
Case $nMsg = $button1 And _IsChecked ($Radio4)
ShellExecute ("http://www.autoitscript.fr/forum/viewforum.php?f=6")
Case $nMsg = $button1 And _IsChecked ($Radio5)
ShellExecute ("http://www.autoitscript.fr/forum/viewforum.php?f=21")
Case $nMsg = $button1 And _IsChecked ($Radio6)
ShellExecute ("http://www.autoitscript.fr/forum/viewforum.php?f=20")
Case $nMsg = $button1 And _IsChecked ($CheckBox1)
ShellExecute ("http://www.autoitscript.fr/forum/search.php")
Case $nMsg = $Pic1
ShellExecute ("http://www.google.fr")
Case $nMsg = $Button1
MsgBox (1+16,"Erreur","Merci de rentrer une option",5)
EndSelect
WEnd
Func _hms ()
$pos = 1
$pose = 45
GUICtrlSetData(GUICtrlCreateLabel("Label10", 24, 248, 218, 25),@HOUR & "h " & @MIN & "min " & @SEC & "s")
EndFunc
Func _IsChecked($control)
Return BitAnd(GUICtrlRead($control),$GUI_CHECKED) = $GUI_CHECKED
EndFunc
Func _tooltip($x1,$x2,$y1,$y2,$texteaff,$guinom)
$tabFenetre = WinGetPos($guinom)
$pos = GUIGetCursorInfo ()
$x = $pos[0]
$y = $pos[1]
If $y >= $y1 And $y <= $y2 Then
If $x >= $x1 And $x <= $x2 Then
ToolTip($texteaff, $x + 12 + $tabFenetre[0], $y + 50 + $tabFenetre[1])
EndIf
Else
ToolTip ("")
EndIf
endfunc 


