Sign in to follow this  
Followers 0
Rallert

"hole" In The Gui

10 posts in this topic

#1 ·  Posted (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. :think:

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 by Rallert

Share this post


Link to post
Share on other sites



Lesson #7 from "Welcome to Autoit 1-2-3"

; 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)


NEWHeader1.png

Share this post


Link to post
Share on other sites

(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?

Share this post


Link to post
Share on other sites

i think it would be like

$B_oIE2.navigate ("C:\dodge.html")

just adjust to your saved folder/location

8)


NEWHeader1.png

Share this post


Link to post
Share on other sites

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.. :think:

Share this post


Link to post
Share on other sites

#6 ·  Posted (edited)

ohh.. i forget the fullpath.. this is neat val!

I lasted 16.891 seconds.. :think:

cool.... remember there is alot more inside "Welcome to Autoit 1-2-3"

and glad it worked

8)

Edited by Valuater

NEWHeader1.png

Share this post


Link to post
Share on other sites

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.

?

Share this post


Link to post
Share on other sites

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.

?

I have the same problem :/

Share this post


Link to post
Share on other sites

either your not using beta cuz objcreates only in beta and or you do not have the proper .au3 files included

Share this post


Link to post
Share on other sites

Thank you.

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  
Followers 0