Rallert Posted April 18, 2006 Share Posted April 18, 2006 (edited) As title says... Can you make a "hole" in the middle of the GUI? So that you can see the GUI, but still click on the game(yes, it's for a game) behind it? Would be cool. EDIT: Thanks... How do I know which object to make? Like Shell.Explorer.2. The game is Diablo II. It is running in window-mode in DirectDraw. -Rallert Edited April 18, 2006 by Rallert Link to comment Share on other sites More sharing options...
Valuater Posted April 18, 2006 Share Posted April 18, 2006 Lesson #7 from "Welcome to Autoit 1-2-3" expandcollapse popup; This is a demonstration for Object Create, similar to Level I. ; Only the Challenge is the portions noted. #include <GuiConstants.au3> opt("MouseCoordMode", 0) ;set mouse coordinates, 1=absolute, 0=relative, 2=client. GUICreate("Object - Mouse Challenge", 614, 370) GUISetFont(9, 400, -1, "MS Sans Serif") $B_oIE2 = ObjCreate("Shell.Explorer.2") $Breaktime = GUICtrlCreateObj($B_oIE2, -1, -40, 470, 435) $html2 = "about:----------------------------------------------------------------------------------------------------------------------CONGRADULATIONS!!! - You have passed, Level II Exam......... To Show AutoIt is Chalenging Too!!!..... Please Press *Enter Break*" & @CR $B_oIE2.navigate ($html2) $Label_x=GUICtrlCreateLabel ("Mouse", 520, 30,50) $Label_y=GUICtrlCreateLabel ("Position", 520, 50,50) $MseStart = GUICtrlCreateButton("&Use Mouse", 505, 270, 80, 25) GUICtrlSetState( -1, $GUI_HIDE); hide the button $BrkStart = GUICtrlCreateButton("&Enter Break", 505, 300, 80, 25) $BrkEnd = GUICtrlCreateButton("&Exit", 505, 330, 80, 25) GUISetState() While 1 $msg = GUIGetMsg() If $msg = $GUI_EVENT_CLOSE Or $msg = $BrkEnd Then Exit EndIf If $msg = $BrkStart Then $B_oIE2.navigate ("http://www.mtbireland.com/dodge.html") GUICtrlSetState( $MseStart, $GUI_SHOW); show the button. MsgBox(262208, "How to Play", "Move the Reb Box and Don't Touch Anything " & @CRLF & "Or, Use the Mouse to Move for You ") EndIf If $msg = $MseStart Then Mouse_Challenge() EndIf WEnd Func Mouse_Challenge() MouseMove( 220, 210); move the mouse to the starting position. $a=MouseGetPos(); read the position. GUIctrlSetData($Label_x,"X = " &$a[0]) ; set the label x. GUIctrlSetData($Label_y,"Y = " &$a[1]); set the label y. MouseClickDrag ( "left", $a[0], $a[1], 100, $a[1]); click and drag the item. Sleep(2000); wait for next move. $b=MouseGetPos(); repeat as needed. GUIctrlSetData($Label_x, "X = " &$b[0]) GUIctrlSetData($Label_y, "Y = " &$b[1]) MouseClickDrag ( "left", $b[0], $b[1], $a[0], $a[1]) Sleep(1000) $b=MouseGetPos() GUIctrlSetData($Label_x, "X = " &$b[0]) GUIctrlSetData($Label_y, "Y = " &$b[1]) MouseClickDrag ( "left", $b[0], $b[1], 80, 80) ; set the last position to the labels. $a=MouseGetPos() GUIctrlSetData($Label_x,"X = " &$a[0]) GUIctrlSetData($Label_y,"Y = " &$a[1]) EndFunc ; to submit your Score, Please copy and post your. ; 1. Time Message. ; 2. Mouse Challenge Function. ; In the AutoIt 1-2-3 Thread. No Cheating. ; Your Mouse Challenge Function may be placed in the next updated Release of Welcome to AutoIt 1-2-3. 8) Link to comment Share on other sites More sharing options...
slightly_abnormal Posted April 18, 2006 Share Posted April 18, 2006 (slightly off topic) I saved dodge.html locally on my machine.. now how do I play it with the file I saved locally in the GUi? Link to comment Share on other sites More sharing options...
Valuater Posted April 19, 2006 Share Posted April 19, 2006 i think it would be like $B_oIE2.navigate ("C:\dodge.html") just adjust to your saved folder/location 8) Link to comment Share on other sites More sharing options...
slightly_abnormal Posted April 19, 2006 Share Posted April 19, 2006 i think it would be like $B_oIE2.navigate ("C:\dodge.html") just adjust to your saved folder/location 8) ohh.. i forget the fullpath.. this is neat val! I lasted 16.891 seconds.. Link to comment Share on other sites More sharing options...
Valuater Posted April 19, 2006 Share Posted April 19, 2006 (edited) ohh.. i forget the fullpath.. this is neat val!I lasted 16.891 seconds.. cool.... remember there is alot more inside "Welcome to Autoit 1-2-3"and glad it worked8) Edited April 19, 2006 by Valuater Link to comment Share on other sites More sharing options...
megahyperion Posted April 23, 2006 Share Posted April 23, 2006 ObjCreate unknown fuction Does autoit keep dropping functions or is it just me? Cause everytime I try a test script from these forums that sounds cool I get an error saying this function or that one is unknown and I remember using a script with ObjCreate in it before. ? Link to comment Share on other sites More sharing options...
Roman9 Posted April 24, 2006 Share Posted April 24, 2006 ObjCreate unknown fuctionDoes autoit keep dropping functions or is it just me?Cause everytime I try a test script from these forums that sounds cool I get an error saying this function or that one is unknown and I remember using a script with ObjCreate in it before.?I have the same problem :/ Link to comment Share on other sites More sharing options...
Thatsgreat2345 Posted April 24, 2006 Share Posted April 24, 2006 either your not using beta cuz objcreates only in beta and or you do not have the proper .au3 files included Link to comment Share on other sites More sharing options...
Roman9 Posted April 24, 2006 Share Posted April 24, 2006 Thank you. 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