Sign in to follow this  
Followers 0
Thornhunt

button help

6 posts in this topic

#1 ·  Posted (edited)

ok.. this is probially very east to solv .. but .. my button dont work :S ..

heres the script for it..

#include <GUIConstants.au3>

GUICreate("Spybot Compiled", 500, 500)                                      ; will create a dialog box that when displayed is centered
$background = GUICtrlCreatePic ("Untitled-1.jpg", 0, 0, 500, 500)           ; background
GUISetState (@SW_SHOW)                                                       ; will display an empty dialog box

$clicktostart = GUICtrlCreateLabel ("Click to start SpyBot Compiled ", 55, 41, 175)
GUICtrlSetFont($clicktostart, 9, 700)
GUICtrlSetBkColor($clicktostart, $GUI_BKCOLOR_TRANSPARENT)


$Button1 = GUICtrlCreateButton ( "  start  ", 10, 40 )                  ; verification button
GUICtrlSetOnEvent ( $Button1, "ok" )
$Button2 = GUICtrlCreateButton ( "  exit  ", 10, 80 )                   ; verification button
GUICtrlSetOnEvent ( $Button2, "close" )

func ok()
    tooltip("hdsfkljbhksdfjlgbjk;dfjgkjadfhjg")                             ; this is just to see if the button actually works 
    sleep(1000000000000)
Endfunc


func close()
    Exit
EndFunc

every thing works but the buttons :)

can some one explain how to fix it please..

(btw please dont refer to the autoit help.. because i was looking throught it all last night and it still hasnt fixed it :/ )

also could you tell me how to stop the script until a button is pressed :P . thanks

Edited by Thornhunt

Budweiser + room = warm beerwarm beer + fridge = too long!warm beer + CO2 fire extinguisher = Perfect![quote]Protect the easly offended ... BAN EVERYTHING[/quote]^^ hmm works for me :D

Share this post


Link to post
Share on other sites



From helpfile at GUICtrlCreatePic

If a picture is set as a background picture, as the other controls will overlap, it's important to disable the pic control : GuiCtrlSetState(-1,$GUI_DISABLE). This does not work with Tab control which behave differently. in this case you need to create the picture with the $WS_CLIPSIBLINGS style, some $GUI_ONTOP can still be necessary for the tab control.

Share this post


Link to post
Share on other sites

tnks ill try


Budweiser + room = warm beerwarm beer + fridge = too long!warm beer + CO2 fire extinguisher = Perfect![quote]Protect the easly offended ... BAN EVERYTHING[/quote]^^ hmm works for me :D

Share this post


Link to post
Share on other sites

WHOOOOOOO.. they work: )

now do you know how to stop the script until one of the buttons are pressed ?? ..

will i haft to use the WHILE and WEND tabs ??


Budweiser + room = warm beerwarm beer + fridge = too long!warm beer + CO2 fire extinguisher = Perfect![quote]Protect the easly offended ... BAN EVERYTHING[/quote]^^ hmm works for me :D

Share this post


Link to post
Share on other sites

WHOOOOOOO.. they work: )

now do you know how to stop the script until one of the buttons are pressed ?? ..

will i haft to use the WHILE and WEND tabs ??

Yes, the standard form is:

$hGUI = GuiCreate()
; ------------------------
; Create GUI
; ------------------------
GuiSetState()

While 1
      ; ------------------------
      ; Maybe do stuff for Msg loop, maybe just wait for Events
      ; ------------------------
WEnd

The variations are infinite...

:)


Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law

Share this post


Link to post
Share on other sites

Tnks.. life savers :)


Budweiser + room = warm beerwarm beer + fridge = too long!warm beer + CO2 fire extinguisher = Perfect![quote]Protect the easly offended ... BAN EVERYTHING[/quote]^^ hmm works for me :D

Share this post


Link to post
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
Sign in to follow this  
Followers 0