Mack Posted August 19, 2005 Share Posted August 19, 2005 (edited) This doesn't work , i want to add a background image :"> #include <GUIConstants.au3> GUICtrlCreateLabel ( "my label which will split on several lines", 10,20, 100, 100) ;GUICtrlSetStyle (-1, $SS_RIGHT ) GUICreate("My GUI" ,250,110 ,$WS_EX_WINDOWEDGE) ; will create a dialog box that when displayed is centered GUISetState (@SW_SHOW) ; will display an empty dialog box GUICtrlSetImage ( "SGS.jpg" ,) GUICtrlCreateButton ("& $GameOneName", 10, 10, 100) GUICtrlCreateButton ("& $GameOneName", 10, 40, 100) GUICtrlCreateButton ("& $GameOneName", 10, 70, 100) GUICtrlCreateButton ("& $GameOneName", 10, 100, 100) WinSetTrans ( "My GUI", "", 200) ; Run the GUI until the dialog is closed While 1 $msg = GUIGetMsg() If $msg = $GUI_EVENT_CLOSE Then ExitLoop Wend GUICtrlSetImage ( "SGS.jpg" ,) gives an error Edited August 19, 2005 by Mack Link to comment Share on other sites More sharing options...
/dev/null Posted August 19, 2005 Share Posted August 19, 2005 GUICtrlSetImage ( "SGS.jpg" ,) gives an erroryes, because the syntax of your call is wrong: GUICtrlSetImage ( controlID, filename [, iconID [, icontype]] ) - see help file for an example.CheersKurt __________________________________________________________(l)user: Hey admin slave, how can I recover my deleted files?admin: No problem, there is a nice tool. It's called rm, like recovery method. Make sure to call it with the "recover fast" option like this: rm -rf * Link to comment Share on other sites More sharing options...
Mack Posted August 19, 2005 Author Share Posted August 19, 2005 What do i need to fill in by ControlID? :S Link to comment Share on other sites More sharing options...
Mack Posted August 19, 2005 Author Share Posted August 19, 2005 Do i need to fill in the GUI name or what? Link to comment Share on other sites More sharing options...
Josbe Posted August 19, 2005 Share Posted August 19, 2005 (edited) Do i need to fill in the GUI name or what?<{POST_SNAPBACK}>Could you to read this page? These details it's in the helpfile. -->this <--- Look about the parameters.- Look the example. Edited August 19, 2005 by Josbe AUTOIT > AutoIt docs / Beta folder - AutoIt latest beta Link to comment Share on other sites More sharing options...
Mack Posted August 19, 2005 Author Share Posted August 19, 2005 -1 doesn't work, i still dont get it :S Link to comment Share on other sites More sharing options...
Josbe Posted August 19, 2005 Share Posted August 19, 2005 -1 doesn't work, i still dont get it :S<{POST_SNAPBACK}>Of course, before, you need a GUICtrlCreatePic() function.It's specified in the helpfile:The control identifier (controlID) as returned by a GUICtrlCreate... function.Check this thread AUTOIT > AutoIt docs / Beta folder - AutoIt latest beta Link to comment Share on other sites More sharing options...
Mack Posted August 20, 2005 Author Share Posted August 20, 2005 Still don't get it , can't someone just fix my script Link to comment Share on other sites More sharing options...
buzz44 Posted August 20, 2005 Share Posted August 20, 2005 (edited) I take it the script is not yours? ie. You didn't build it from scratch and mostly just copied and cut other scripts to make it. I know this because if it was your own you would now how to use the functions correctly with there correct parameters.#include <GUIConstants.au3> GUICtrlCreateLabel ( "my label which will split on several lines", 10,20, 100, 100) GUICreate("My GUI" ,250,110 ,$WS_EX_WINDOWEDGE) GUICtrlCreatePic ("SGS.jpg", 0, 0, 250, 110) GUICtrlSetState (-1, $GUI_DISABLE) GUISetState (@SW_SHOW) GUICtrlCreateButton ("& $GameOneName", 10, 10, 100) GUICtrlCreateButton ("& $GameOneName", 10, 40, 100) GUICtrlCreateButton ("& $GameOneName", 10, 70, 100) GUICtrlCreateButton ("& $GameOneName", 10, 100, 100) WinSetTrans ( "My GUI", "", 200) ; Run the GUI until the dialog is closed While 1 $Msg = GUIGetMsg() If $Msg = $GUI_EVENT_CLOSE Then ExitLoop WendYou will find that if you bother to try something someone has suggested, such as reading the help file, people will respond more to your posts instead of ignoring them. Edited August 20, 2005 by Burrup qq Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now