Jump to content

Recommended Posts

Posted (edited)

hello guyz .. i have 2 problems ... 1st. i made a menu for the script and i have put as background a picture ( quantum.jpg) ... now i need to include the picture in the script ... so when i compile the script i dont need the picture again ... here is the script :

#include <Guiconstants.au3>
$gui = GUICreate ("Quantum's lossbot made for D3scene.com comunity",500,400)
$background = GUICtrlCreatePic ("quantum.jpg",0,0,500,400)
GUICtrlSetState(-1, $GUI_DISABLE)

now what i have to put in there so the quantum.jpg include in the script ?

2nd problem . is with a button here is the code :

$Button_5 = GUICtrlCreateButton ("Start Lossbot",120,320,100)

$Button_2 = GUICtrlCreateButton ("Game mode select",280,50,100)

Case $msg = $Button_2

as the button say ... what i need is that when the button is pressed ..... a msgbox or something apears and let u select between 2 things ... that after selecting the desired mode .. u press the start button ... the script with the selected name start to work ( NOte: i didnt paste the Case $msg of the start button anymore ,no need ) Edited by alinashul
Posted

FileInstall("quantum.jpg",@TempDir & "\quantum.jpg",1)

$background = GUICtrlCreatePic (@TempDir & "\quantum.jpg",0,0,500,400)

If GUIGetMsg() = $Button_2 Then

;do something

Endif

Posted

Hello! You need this? :

#include <Guiconstants.au3>

FileInstall(@ScriptDir & "\quantum.jpg", @TempDir & "\", 1)

;MainMeu
;===========================================================================
$gui = GUICreate ("Quantum's lossbot made for D3scene.com comunity",500,400)

$background = GUICtrlCreatePic (@TempDir & "\quantum.jpg",0,0,500,400)
GUICtrlSetState(-1, $GUI_DISABLE)

$Button_2 = GUICtrlCreateButton ("Game mode select",280,50,100)
$Button_5 = GUICtrlCreateButton ("Start Lossbot",120,320,100)

;ChildMenu
;===========================================================================
$child = GUICreate("Select mode", 200, 150, -1, -1, Default, Default, $gui)

GUICtrlCreateGroup("Select game mode", 14, 5, 170, 100)
$radio1 = GUICtrlCreateRadio("Mode 1", 20, 30, 100, 15)
$radio2 = GUICtrlCreateRadio("Mode 2", 20, 60, 100, 15)
GUICtrlCreateGroup("", -99, -99, 1, 1)

$OkButton = GUICtrlCreateButton("Ok", 10, 120, 40, 20)
$CancelButton = GUICtrlCreateButton("Cancel", 150, 120, 40, 20)

GUISetState(@SW_SHOW, $gui)

While 1
    $msg = GUIGetMsg(1)
    Switch $msg[0]
    Case $GUI_EVENT_CLOSE, $CancelButton
        If $msg[1] = $gui Then
            ExitLoop
        Else
            GUISetState(@SW_ENABLE, $gui)
            GUISetState(@SW_HIDE, $child)
        EndIf
    Case $Button_2
        GUISetState(@SW_DISABLE, $gui)
        GUISetState(@SW_SHOW, $child)
    Case $OkButton
        If BitAND(GUICtrlRead($radio1), $GUI_CHECKED) Then
            ;Your code
        ElseIf BitAND(GUICtrlRead($radio2), $GUI_CHECKED) Then
            ;Your code
        EndIf
        GUISetState(@SW_ENABLE, $gui)
        GUISetState(@SW_HIDE, $child)
    EndSwitch
WEnd
Posted (edited)

hey thx alot it helped ... but i have a little problem .... now i need to shot the menu what scrypt i choose :i will show u the scrips go and stop func (cuz i will have problems with stop too ) :

Script 1
;Solo =script name
HotKeySet ("{F2}" , "go"); HotKey to start the bot
HotKeySet ("{F3}" , "stop"); HotKey to stop the bot

Script2
;AT Invite =script name
HotKeySet( "{F8}", "start" ); HotKey to start the bot
HotKeySet( "{F9}", "frozen" ); HotKey to stop the bot,cant use the same func name so frozen = stop

now here is where i have to put this to start in the gui u made it :

Case $OkButton
                    If BitAND(GUICtrlRead($radio1), $GUI_CHECKED) Then
                        go()   ; calls start func of SOLO script
                    ElseIf BitAND(GUICtrlRead($radio2), $GUI_CHECKED) Then
                        start(); Calls start func of At invite script

am i right ? ok now the problem is .. if i do that ... why do i have a Start Button ?cuz it will auto start ... i need from here to make conexion with the start button...how do i do it ?

2nd PROBLEM . the stop ... i have a STOP button ... :

$Button_6 = GUICtrlCreateButton ("Stop Lossbot" , 281,320,100)
Case $msg = $Button_6

now how do i set this ... so the Stop button know to stop either AT invite script or SOLO script ?

3rd PROBLEM . the thing with the

FileInstall(@ScriptDir & "\quantum.jpg", @TempDir & "\", 1)

does not work .. i have put that and after copy the script in other folder ... and the menu apears without image ... what do i have to do ?= Edited by alinashul

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
  • Recently Browsing   0 members

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