wander Posted September 26, 2008 Share Posted September 26, 2008 (edited) Hello,I am new in AutoIt,so i need help with my script #include <ButtonConstants.au3> #include <GUIConstantsEx.au3> #include <StaticConstants.au3> #include <WindowsConstants.au3> #Region ### START Koda GUI section ### Form=c:\documents and settings\administrator\desktop\characterguide.kxf $CharacterGuide = GUICreate("CharacterGuide", 633, 447, 200, 112) GUISetIcon("C:\Documents and Settings\Administrator\Desktop\start.ico") $Archer = GUICtrlCreateButton("Archer", 0, 288, 122, 26, 0) GUICtrlSetBkColor(-1, 0xFFFF00) $Glavier = GUICtrlCreateButton("Glavier", 152, 288, 99, 25, 0) GUICtrlSetBkColor(-1, 0x0000FF) $NukerWithSpear = GUICtrlCreateButton("NukerWithSpear", 288, 288, 99, 25, 0) GUICtrlSetBkColor(-1, 0x008000) $NukerWithSwordAndShield = GUICtrlCreateButton("NukerWithSwordAndShield", 448, 288, 139, 25, 0) GUICtrlSetBkColor(-1, 0xFF0000) GUICtrlCreateLabel("", 0, 0, 4, 4) $Pic3 = GUICtrlCreatePic("D:\Silkroad Online Character Guide\Data\Picture\Spear.jpg", 288, 328, 100, 100, BitOR($SS_NOTIFY,$WS_GROUP,$WS_CLIPSIBLINGS)) $Pic4 = GUICtrlCreatePic("D:\Silkroad Online Character Guide\Data\Picture\Glavie.jpg", 152, 328, 100, 100, BitOR($SS_NOTIFY,$WS_GROUP,$WS_CLIPSIBLINGS)) $Pic5 = GUICtrlCreatePic("D:\Silkroad Online Character Guide\Data\Picture\Sword.jpg", 432, 320, 68, 100, BitOR($SS_NOTIFY,$WS_GROUP,$WS_CLIPSIBLINGS)) $Pic6 = GUICtrlCreatePic("D:\Silkroad Online Character Guide\Data\Picture\Shield.jpg", 496, 320, 84, 100, BitOR($SS_NOTIFY,$WS_GROUP,$WS_CLIPSIBLINGS)) $Pic2 = GUICtrlCreatePic("D:\Silkroad Online Character Guide\Data\Picture\Bow.jpg", 8, 328, 100, 100, BitOR($SS_NOTIFY,$WS_GROUP,$WS_CLIPSIBLINGS), $WS_EX_CLIENTEDGE) $Button1 = GUICtrlCreateButton("Button1", 176, 384, 9, 1, 0) $Pic1 = GUICtrlCreatePic("D:\Silkroad Online Character Guide\Data\Picture\Main Picture.jpg", 0, 0, 628, 284, BitOR($SS_NOTIFY,$WS_GROUP,$WS_CLIPSIBLINGS)) GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ### While 1 $nMsg = GUIGetMsg() Select Case $GUI_EVENT_CLOSE EndSelect WEnd My first question is how can i make my button- Archer to lead to other window and my second question is how i can make the picture vissible for all people,either when they don't have the picture Edited September 26, 2008 by wander Link to comment Share on other sites More sharing options...
Pain Posted September 26, 2008 Share Posted September 26, 2008 While 1 $nMsg = GUIGetMsg() Select Case $GUI_EVENT_CLOSE Exit Case $Archer ;Do something EndSelect WEnd and FileInstall for the pictures should work just fine Link to comment Share on other sites More sharing options...
wander Posted September 26, 2008 Author Share Posted September 26, 2008 While 1 $nMsg = GUIGetMsg() Select Case $GUI_EVENT_CLOSE Exit Case $Archer ;Do something EndSelect WEnd and FileInstall for the pictures should work just fine I tried While 1 $nMsg = GUIGetMsg() Select Case $GUI_EVENT_CLOSE Exit Case $Archer ;GUICreate("Archer Guide", 400, 400, 200, 112) EndSelect WEnd And run it it automaticly closes Link to comment Share on other sites More sharing options...
Pain Posted September 26, 2008 Share Posted September 26, 2008 Here you got expandcollapse popup#include <ButtonConstants.au3> #include <GUIConstantsEx.au3> #include <StaticConstants.au3> #include <WindowsConstants.au3> #Region ### START Koda GUI section ### Form=c:\documents and settings\administrator\desktop\characterguide.kxf $CharacterGuide = GUICreate("CharacterGuide", 633, 447, 200, 112) GUISetIcon("C:\Documents and Settings\Administrator\Desktop\start.ico") $Archer = GUICtrlCreateButton("Archer", 0, 288, 122, 26, 0) GUICtrlSetBkColor(-1, 0xFFFF00) $Glavier = GUICtrlCreateButton("Glavier", 152, 288, 99, 25, 0) GUICtrlSetBkColor(-1, 0x0000FF) $NukerWithSpear = GUICtrlCreateButton("NukerWithSpear", 288, 288, 99, 25, 0) GUICtrlSetBkColor(-1, 0x008000) $NukerWithSwordAndShield = GUICtrlCreateButton("NukerWithSwordAndShield", 448, 288, 139, 25, 0) GUICtrlSetBkColor(-1, 0xFF0000) GUICtrlCreateLabel("", 0, 0, 4, 4) $Pic3 = GUICtrlCreatePic("D:\Silkroad Online Character Guide\Data\Picture\Spear.jpg", 288, 328, 100, 100, BitOR($SS_NOTIFY,$WS_GROUP,$WS_CLIPSIBLINGS)) $Pic4 = GUICtrlCreatePic("D:\Silkroad Online Character Guide\Data\Picture\Glavie.jpg", 152, 328, 100, 100, BitOR($SS_NOTIFY,$WS_GROUP,$WS_CLIPSIBLINGS)) $Pic5 = GUICtrlCreatePic("D:\Silkroad Online Character Guide\Data\Picture\Sword.jpg", 432, 320, 68, 100, BitOR($SS_NOTIFY,$WS_GROUP,$WS_CLIPSIBLINGS)) $Pic6 = GUICtrlCreatePic("D:\Silkroad Online Character Guide\Data\Picture\Shield.jpg", 496, 320, 84, 100, BitOR($SS_NOTIFY,$WS_GROUP,$WS_CLIPSIBLINGS)) $Pic2 = GUICtrlCreatePic("D:\Silkroad Online Character Guide\Data\Picture\Bow.jpg", 8, 328, 100, 100, BitOR($SS_NOTIFY,$WS_GROUP,$WS_CLIPSIBLINGS), $WS_EX_CLIENTEDGE) $Button1 = GUICtrlCreateButton("Button1", 176, 384, 9, 1, 0) $Pic1 = GUICtrlCreatePic("D:\Silkroad Online Character Guide\Data\Picture\Main Picture.jpg", 0, 0, 628, 284, BitOR($SS_NOTIFY,$WS_GROUP,$WS_CLIPSIBLINGS)) GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ### While 1 $nMsg = GUIGetMsg() Select Case $nMsg = $GUI_EVENT_CLOSE Exit Case $nMsg = $Archer MsgBox(0, "", "hello world :) ") EndSelect WEnd Link to comment Share on other sites More sharing options...
wander Posted September 26, 2008 Author Share Posted September 26, 2008 Thank You verry much.Now i just need to deal with the picture thing so everyone who use it to can see them Link to comment Share on other sites More sharing options...
Pain Posted September 26, 2008 Share Posted September 26, 2008 Try something like this, compile your script and anyone should be able to see the pictures. FileInstall("D:\Silkroad Online Character Guide\Data\Picture\Spear.jpg", @TempDir & "\Spear.jpg") GUICtrlCreatePic(@TempDir & "\Spear.jpg", 288, 328, 100, 100, BitOR($SS_NOTIFY,$WS_GROUP,$WS_CLIPSIBLINGS)) 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