Jump to content
Sign in to follow this  
caia

My Problem

Recommended Posts

caia

Thank you for the suggestions. I have downloaded AutoIT 1-2-3, it was very good. but I am new to programming, I still have few questions for the Lesson 2 would like to ask you guys. The source code is written as this:

include <GuiConstants.au3> ;so this one is like directory, every C or C++ source code contains include header file, but where is this library in the help?

GUICreate("Object Test", 614, 370) ;Create the GUI with a title of, Object Test. I understand this.

GUISetFont(9, 400, -1, "MS Sans Serif") ;set the font size to number 9, the weight, and the style, I think this function has 5 parameters. The fifth parameter is called "winhadle", the explanation from the help is this "[optional] Windows handle as returned by GUICreate (default is the previously used window)" What is the meaning of "Windows handle as returned by GUICreate"?

$B_oIE1 = ObjCreate("Shell.Explorer.2") ;create the, explorer object. So, $B_oIE1 is the variable that function ObjCreate is going to return to, the "Shell.Explorer" is the internal window application, if "Explorer" is referring to internet explorer, then what is .2 mean? can we name is this as "$B_oIE1 = ObjCreate("Shell.Explorer.3)"?

$Breaktime = GUICtrlCreateObj($B_oIE1, -1, -1, 500, 370) ;so, in this case, another object variable "$Breaktime" is created, and the function "GUICtrlCreatObj" will return to this?

$html = "about:CONGRADULATIONS!!! - You have passed, Level I Basic Exam......... To Show Autoit can be Fun Too!!!..... Please Press *Enter Break*" & @CR ;My understanding for this is a variable called html will hold all the text within the "", but why "about" didn't get print out within "Object Test" window?

$B_oIE1.navigate ( $html) ; navigate the explorer object to the html variable, ( known as about ). This is the most trouble one for me, could you explain to me what is this, and how to form this? My understanding is in order to navigate the "Object Test"window, I have to creat a function that is variable ($name) + (.) and navigate (html)? I am trying to find out where the navigate come from in the help, I couldn't find it. and I got lost completly, could you explan this in details?

; create the two buttons.

$BrkStart = GUICtrlCreateButton("&Enter Break", 515, 300, 80, 25)

$BrkEnd = GUICtrlCreateButton("&Exit", 515, 330, 80, 25)

;I understand this

GUISetState() ;set the GUI as Visible. I understand this.

While 1 ; start loop, so the script continues and does not exit. I understand this

$msg = GUIGetMsg() //listen for a message. I got it.

If $msg = $GUI_EVENT_CLOSE Or $msg = $BrkEnd Then ; if exit is pressed, then exit the script. got it.

Exit

EndIf

If $msg = $BrkStart And IsObj($B_oIE1) Then

$B_oIE1.navigate ('http://www.neave.com/games/tictactoe/game.php') ;if this button is pushed, we navigate the object to the game site. again could you explain this "$B_oIE1.navigate('http://www.neave.com/games/tictactoe/game.php')"

EndIf

WEnd ; end loop.

Sorry about this, I am a beginner and I really like to catch up lot of things here and thank you so much!

Alex

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  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.