Marcdk Posted January 24, 2009 Posted January 24, 2009 Okay i have been struggling with this in a loong time now, been searching the forums, and everything. I just started coding autoit and i allready got the first problems comming. I have a form with 2 inputs and a picture. Once the picture is clicked a new gui has to show (And not delete the first one, because i'll be using that later on) In the new gui i have to get a website embedded. but only in a small frame (box, whatever you call it), so there is space to text and instructions into the form. I assume i have to use some functions to do this, but how to build them up is a bit confusing to me. This is my code which for me looks completly wrong, like something is missing. Also i didn't code any embedding into the new gui because i'm not 100 % sure how to do that. #include <EditConstants.au3> #include <GUIConstantsEx.au3> #include <StaticConstants.au3> #include <WindowsConstants.au3> #Region ### START Koda GUI section ### Form=C:\Program Files\AutoIt3\SciTE\Koda\Forms\youtube acc creator.kxf $Form1 = GUICreate("Test program ", 321, 401, 193, 125) GUISetBkColor(0x808080) $Label1 = GUICtrlCreateLabel("", 40, 32, 4, 4) GUICtrlCreateInput("", 168, 40, 121, 21) $Account = GUICtrlCreateLabel("Account", 24, 48, 73, 17) $Label2 = GUICtrlCreateLabel("Username", 24, 80, 95, 17) $Input1 = GUICtrlCreateInput("", 168, 72, 121, 21) $Label3 = GUICtrlCreateLabel("Select which email you would like to use", 64, 152, 194, 17) $Pic1 = GUICtrlCreatePic("C:\Users\Marc\Desktop\Temp.jpg", 88, 184, 142, 185, BitOR($SS_NOTIFY,$WS_GROUP,$WS_CLIPSIBLINGS)) GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ### Global $Pic1 While 1 $nMsg = GUIGetMsg() Func Button1Click () $Pic1 = _Email EndFunc Wend Func _Email () $NewGUI = Guicreate ("NewGUI",400,400) GUISetBkColor(0x808080) EndFunc Wend Switch $nMsg Case $GUI_EVENT_CLOSE Exit EndSwitch WEnd Any help is greatly appreciated! Thanks a lot
Kip Posted January 24, 2009 Posted January 24, 2009 While 1 $nMsg = GUIGetMsg() Func Button1Click () $Pic1 = _Email EndFuncWend Func _Email () $NewGUI = Guicreate ("NewGUI",400,400) GUISetBkColor(0x808080) EndFuncWend Switch $nMsg Case $GUI_EVENT_CLOSE Exit EndSwitchWEndHmm...1. You can't declare functions inside a loop or any kind of other statement.2. Why are you closing 3 'while' loops while you only created 1?Now I first was going help you, but seeing that you've made so many mistakes I advise you to learn the basics first. MailSpons: Fake SMTP server for safe email testing Dutch postcode & address API.
Marcdk Posted January 24, 2009 Author Posted January 24, 2009 Hmm...1. You can't declare functions inside a loop or any kind of other statement.2. Why are you closing 3 'while' loops while you only created 1?Now I first was going help you, but seeing that you've made so many mistakes I advise you to learn the basics first.I tried to run my script, and it repeated saying that i needed an Wend, lol, that's why i have that many of them..Hm, and yes, i'm not that skilled in AutoIt yet, that's the reason i'm asking for help. I don't know where to learn the basics, i've been told to search for help in the helpfile, but man, that's like looking up in a dictionary. It's not really a helpfull "guide". I've been searching around the net to find some GOOD guides, which explains it all, but without luck. I also tried searching the forum to get the answer for my issue. And i also downloaded the Autoit 1 2 3 zip file with scripts, and guide, and whatever. However it doesn't help me at all. I'm trying to learn by myself. That's the only way to go for me. I can't sit there and read a dictionary, i get tired/bored, and i end up doing something else. So please, if you (or anyone else) could help me with this one, i would really appreciate it, because i by that could see the hole structere, and try to understand how it's all been builded up. Thanks in advance..
dgarrett8 Posted January 24, 2009 Posted January 24, 2009 I pmed you already fyi. "I think, therefore I am"[size="1"]René Descartes[/size]
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