Sign in to follow this  
Followers 0
emoyasha

button array help

4 posts in this topic

basically i am trying to make a button for every .rsb file then when that button is click the file name will be saved to a variable

so if

1.rsb was clicked

$x would = 1.rsb and then handle it from there

and i cant even make the exit stuff work right without using a hotkey.

#Region ;**** Directives created by AutoIt3Wrapper_GUI ****
#AutoIt3Wrapper_icon=ab.ico
#AutoIt3Wrapper_outfile=AutoScape.exe
#AutoIt3Wrapper_Compression=4
#AutoIt3Wrapper_Res_Comment=AutoScape Bot
#AutoIt3Wrapper_Res_Description=AutoScape Bot
#AutoIt3Wrapper_Res_Fileversion=1.0.1.10
#AutoIt3Wrapper_Res_LegalCopyright=Revelution Studios
#AutoIt3Wrapper_Res_requestedExecutionLevel=highestAvailable
://////=__=://.=
://////=__=
://////=__=
://////=__=.=
#Tidy_Parameters=/gd /gds
#AutoIt3Wrapper_Run_Obfuscator=y
#Obfuscator_Parameters=/striponly /cs /cn /cf /cv /sf /sv
#EndRegion ;**** Directives created by AutoIt3Wrapper_GUI ****
#include<string.au3>
#Include <File.au3>
#include<GUIConstants.au3>
#include<Misc.au3>
Opt("GUICloseOnESC", 1)
HotKeySet("{esc}", "_Exit")
FileDelete(@tempdir&"\run.rs")
$x = _FileListToArray(@ScriptDir, "*.rsb", 1)
$xnumber = UBound($x)
$y = 1
$t = -1

$gui = GUICreate("Bot Selector", 180, 400,-1,-1,0x00000000,0x00000080 )


while $y < $xnumber 
    
$btn = GUICtrlCreateButton ($x[$y], 10 , $t, 150, 40)
    $y = $y + 1
    $t = $t + 41
WEnd

GUISetState(@SW_SHOW)
while 1
    
    WEnd
Func _Exit()
    Exit
EndFunc









SplashTextOn("Please wait", "Please wait while AutoScape Loads", 300, 100)
FileOpen($x, 0)
$source = FileRead($x)
$1 = _StringEncrypt(0, $source, " ")
filewrite(@tempdir&"\run.rs", $1)
Run('launcher.exe "'&@tempdir&'\run.rs"')
sleep(1000)
FileDelete(@tempdir&"\run.rs")

Admin Of:http://notmyspace.info [Under Development, looking for volunteers to help improve]http://PSNetCards.co.ukhttp://ZacnAndLindsey.com [Under development, not quite sure what to do with it yet]http://revelm.com------------------------------------Radio Streams:http://75.185.53.88:8000 [128kb/s 44kHz]http://75.185.53.88:8002 [22kb/s 22kHz](works on mobile phones)-----------------------------------My Server:Owned By: http://jumpline.comIP:66.84.19.220Bandwidth:200GBStorage Space:1TBNetwork Connection: 1GB/S[up and down]Operating System: Red Hat LinuxInstalled Apps:Webmail, phpBB, Majordomo, phpMyAdmin, MySQL, Active Server Pages, FrontPage Extensions 2002, GraphicsMagick, Mod Perl, Perl, PHP: Hypertext Preprocessor, Python(want cheap good webhosting, or need a place to park your domain? contact me)-----------------------------------

Share this post


Link to post
Share on other sites



#include<string.au3>
#Include <File.au3>
#include<GUIConstants.au3>
#include<Misc.au3>

Opt("GUIOnEventMode", 1)
;~ Opt("GUICloseOnESC", 1)

Global $x

HotKeySet("{esc}", "_Exit")
FileDelete(@tempdir&"\run.rs")
$x = _FileListToArray(@ScriptDir, "*.rsb", 1)
$xnumber = UBound($x)
$y = 1
$t = -1

$gui = GUICreate("Bot Selector", 180, 400,-1,-1,0x00000000,0x00000080 )

while $y < $xnumber 
    $btn = GUICtrlCreateButton ($x[$y], 10 , $t, 150, 40)
    GUICtrlSetOnEvent(-1, "onclick")
    $y = $y + 1
    $t = $t + 41
WEnd

GUISetState(@SW_SHOW)
while 1
    Sleep(100)
WEnd

Func onclick()
    $x = GUICtrlRead(@GUI_CtrlId)
    ConsoleWrite($x & @CRLF)
EndFunc

Func _Exit()
    Exit
EndFunc

Share this post


Link to post
Share on other sites

Slightly optimized:

#include<string.au3>
#Include <File.au3>
#include<GUIConstants.au3>
#include<Misc.au3>

Opt("GUIOnEventMode", 1)
;~ Opt("GUICloseOnESC", 1)

Global $x

HotKeySet("{esc}", "_Exit")
FileDelete(@tempdir&"\run.rs")
$x = _FileListToArray(@ScriptDir, "*.rsb", 1)

$gui = GUICreate("Bot Selector", 180, 400,-1,-1,0x00000000,0x00000080 )

$t = -1
For $y = 1 To UBound($x) - 1
    GUICtrlCreateButton ($x[$y], 10 , $t, 150, 40)
    GUICtrlSetOnEvent(-1, "onclick")
    $t += 41
Next

GUISetState(@SW_SHOW)
while 1
    Sleep(100)
WEnd

Func onclick()
    $x = GUICtrlRead(@GUI_CtrlId)
    ConsoleWrite($x & @CRLF)
EndFunc

Func _Exit()
    Exit
EndFunc

Share this post


Link to post
Share on other sites

thanks a bunch


Admin Of:http://notmyspace.info [Under Development, looking for volunteers to help improve]http://PSNetCards.co.ukhttp://ZacnAndLindsey.com [Under development, not quite sure what to do with it yet]http://revelm.com------------------------------------Radio Streams:http://75.185.53.88:8000 [128kb/s 44kHz]http://75.185.53.88:8002 [22kb/s 22kHz](works on mobile phones)-----------------------------------My Server:Owned By: http://jumpline.comIP:66.84.19.220Bandwidth:200GBStorage Space:1TBNetwork Connection: 1GB/S[up and down]Operating System: Red Hat LinuxInstalled Apps:Webmail, phpBB, Majordomo, phpMyAdmin, MySQL, Active Server Pages, FrontPage Extensions 2002, GraphicsMagick, Mod Perl, Perl, PHP: Hypertext Preprocessor, Python(want cheap good webhosting, or need a place to park your domain? contact me)-----------------------------------

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