Jump to content

GUI problem


Recommended Posts

;=========================================================
;Reinn's 'Shooting gallery' bot
;=========================================================
;Version 1.0
;=========================================================
;Made by:
;Reinn at www.Fleud.com
;Reinn at www.Autoitscript.com
;FleudReinn at www.Youtube.com
;=========================================================
;www.Fleud.com for updates
;=========================================================
;Credits to: Fleud.com, AutoItscript.com for making AutoIt
;=========================================================
;Extra credits to: MDiesel, More to come!
;=========================================================

#include <GUIConstants.au3>

HotKeySet('{F8}', 'Search')
HotKeySet('{ESC}', 'Stop')

$Form1_1 = GUICreate("Reinn's 'Shooting gallery' bot", 354, 179, 193, 125)
$Combo1 = GUICtrlCreateCombo("1280 * 1024", 120, 120, 113, 25)
GUICtrlSetData(-1, "1024 * 768")
$Pic1 = GUICtrlCreatePic("D:\Users\Jan\Pictures\Photoshop\GUI.jpg", 0, 0, 353, 177)
GUISetState(@SW_SHOW)

$Left=0
$Top=0
$Right=1000
$Bottom=800

While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
        Case $GUI_EVENT_CLOSE
            Exit
    EndSwitch
WEnd

Dim $Count = 0

Func Search()
    For $Count = 1 To 5
        $Search=PixelSearch ($Left,$Top,$Right,$Bottom,0xFF0000,5,2)
        If Not @error Then MouseClick ("Left",$Search[0],$Search[1],1,10)
        Sleep(20)
    Next
    If GuiCtrlRead($Combo1) = "1024 * 768" Then
        MouseClick("Left",598,549,1)
    ElseIf GuiCtrlRead($Combo1) = "1280 * 1024" Then
        MouseClick("left",754,716,1)
    EndIf
    Search()
EndFunc

Func Stop()
    $Visit = MsgBox(0x44, "Reinn's Screenshot Tool", "Would you like to go to Fleud.com now?")
    If ( $Visit = 6 ) Then
        ShellExecute("http://www.Fleud.com/")
    Else
    EndIf
    Exit
EndFuncoÝ÷ ØuëaƧv+p¢¹,~æx­Â§¢w¨~l®'§vËn®x­¢x­v¬mz÷§¶êç¢r$-êk¡¹^+"Ø^B*º^jëh×6$Pic1 = GUICtrlCreatePic("D:\Users\Jan\Pictures\Photoshop\GUI.jpg", 0, 0, 353, 177)
Link to comment
Share on other sites

I'm not sure which problem you mean but it looks like you need to use

FileInstall perhaps to add the jpg

and

@ScriptDir instead of D:\.... etc

Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script.
Link to comment
Share on other sites

I'm not sure which problem you mean but it looks like you need to use

FileInstall perhaps to add the jpg

and

@ScriptDir instead of D:\.... etc

Okey, I've encountered a problem..

$Pic = FileInstall("D:\Users\Jan\Pictures\Photoshop\GUI.jpg", @ScriptDir)
$Pic1 = GuiCtrlCreatePic(@ScriptDir & "GUI.jpg", 0, 0, 353, 177)

That's what it is now, and the GUI is gone completely now...

Link to comment
Share on other sites

Okey, I've encountered a problem..

$Pic = FileInstall("D:\Users\Jan\Pictures\Photoshop\GUI.jpg", @ScriptDir)
$Pic1 = GuiCtrlCreatePic(@ScriptDir & "GUI.jpg", 0, 0, 353, 177)

That's what it is now, and the GUI is gone completely now...

Maybe because it should be

$Pic1 = GuiCtrlCreatePic(@ScriptDir & "\GUI.jpg", 0, 0, 353, 177)
Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script.
Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...