Sign in to follow this  
Followers 0
riki

Logical problem and a GUI-update question

6 posts in this topic

I'm writing this Bot for a game and i'm trying to cover all areas i need, so far so good.

Now these are the functions of the bot:

  • SpamBox : Sends a message to chate every X seconds, When strated
  • HuntingBot : When strated it reapeats itself untill i stop it
  • MiningBot : When strated it reapeats itself untill i stop it
  • CraftingBot : When strated it reapeats itself untill i stop it
Well thats it, my problem is how to make Spambox able to run at the same time as one of the other 3 functions?

Last problem is that i would want to be able to update the GUI so that i can send uotput on whats going on:

ex: "Script wating for game to be loaded" "Running Script: Hunting" "Script Paused: Gamewindow Inactive"

Share this post


Link to post
Share on other sites



Hi,

have a look at adlib() and GuiCtrlCreateLabel and GUICtrlSetData().

That should help you out.

So long,

Mega

PS: Show some code and the forum will help you further along.


Scripts & functions Organize Includes Let Scite organize the include files

Yahtzee The game "Yahtzee" (Kniffel, DiceLion)

LoginWrapper Secure scripts by adding a query (authentication)

_RunOnlyOnThis UDF Make sure that a script can only be executed on ... (Windows / HD / ...)

Internet-Café Server/Client Application Open CD, Start Browser, Lock remote client, etc.

MultipleFuncsWithOneHotkey Start different funcs by hitting one hotkey different times

Share this post


Link to post
Share on other sites

Hi,

have a look at adlib() and GuiCtrlCreateLabel and GUICtrlSetData().

That should help you out.

So long,

Mega

PS: Show some code and the forum will help you further along.

My question is almost similar in nature, except that it's not for a bot or anything like that.

Scenario:

I'm creating a gui like this:

guicreate("Synchronization in Progress",400,250,-1,-1,-1,$WS_EX_TOPMOST)
guisetbkcolor(0xffffff)
Guisetfont(14, 400,0 ,"Courier")
guictrlcreatelabel("Database Syncronization running. Bases will", 2, 10)
guictrlcreatelabel("be shut down until complete.", 2, 25)
guictrlcreatelabel("Current Status: ", 2, 45)

guictrlcreatepic("C:\Documents and Settings\jfritzsche\My Documents\My Pictures\Docubase Projects\transparent logo.gif", 90, 175, 0, 0)
guisetstate(@sw_show)

Now, obviously I can create the darn thing... here's what I want to do with it... on the same like that "Current Status: " is located, I want to have a series of text that is updated according to where the script is in it's processing...

At some point during the scripts run, it will be doing an FTP download. I'd like to do something similar to the ftp tooltip that is in the AutoIt documentation:

While @InetGetActive
        TrayTip("Downloading " & $rarfilename, "Total Size: " & $ftpsize & "Total Transferred : " & @InetGetBytesRead, 10, 16)
          Sleep(250)
    Wend

But obviously, I don't want it to be a tooltip, I want it to be in that GUI window. Can someone help me out with this, or if you have the time, just tell me what the correct coding would be? I'm under a deadline and this is, literally, one of the last things that I need to do.

anybody??? :D

Share this post


Link to post
Share on other sites

My question is almost similar in nature, except that it's not for a bot or anything like that.

Scenario:

I'm creating a gui like this:

guicreate("Synchronization in Progress",400,250,-1,-1,-1,$WS_EX_TOPMOST)
guisetbkcolor(0xffffff)
Guisetfont(14, 400,0 ,"Courier")
guictrlcreatelabel("Database Syncronization running. Bases will", 2, 10)
guictrlcreatelabel("be shut down until complete.", 2, 25)
guictrlcreatelabel("Current Status: ", 2, 45)

guictrlcreatepic("C:\Documents and Settings\jfritzsche\My Documents\My Pictures\Docubase Projects\transparent logo.gif", 90, 175, 0, 0)
guisetstate(@sw_show)

Now, obviously I can create the darn thing... here's what I want to do with it... on the same like that "Current Status: " is located, I want to have a series of text that is updated according to where the script is in it's processing...

At some point during the scripts run, it will be doing an FTP download. I'd like to do something similar to the ftp tooltip that is in the AutoIt documentation:

While @InetGetActive
        TrayTip("Downloading " & $rarfilename, "Total Size: " & $ftpsize & "Total Transferred : " & @InetGetBytesRead, 10, 16)
          Sleep(250)
    Wend

But obviously, I don't want it to be a tooltip, I want it to be in that GUI window. Can someone help me out with this, or if you have the time, just tell me what the correct coding would be? I'm under a deadline and this is, literally, one of the last things that I need to do.

anybody??? :D

Something as simple as:

guicreate("Synchronization in Progress",400,250,-1,-1,-1,$WS_EX_TOPMOST)
guisetbkcolor(0xffffff)
Guisetfont(14, 400,0 ,"Courier")
guictrlcreatelabel("Database Syncronization running. Bases will", 2, 10)
guictrlcreatelabel("be shut down until complete.", 2, 25)
$status = guictrlcreatelabel("Current Status: ", 2, 45)

guictrlcreatepic("C:\Documents and Settings\jfritzsche\My Documents\My Pictures\Docubase Projects\transparent logo.gif", 90, 175, 0, 0)
guisetstate(@sw_show)
.
.
.
;During FTP Transaction
GuiCtrlSetData($status, "Current Status: "&"Downloading " & $rarfilename & "Total Size: " & $ftpsize & "Total Transferred : " & @InetGetBytesRead)

I hope this helps. If I'm misunderstanding you, please expand.

Share this post


Link to post
Share on other sites

#5 ·  Posted (edited)

Something as simple as:

guicreate("Synchronization in Progress",400,250,-1,-1,-1,$WS_EX_TOPMOST)
guisetbkcolor(0xffffff)
Guisetfont(14, 400,0 ,"Courier")
guictrlcreatelabel("Database Syncronization running. Bases will", 2, 10)
guictrlcreatelabel("be shut down until complete.", 2, 25)
$status = guictrlcreatelabel("Current Status: ", 2, 45)

guictrlcreatepic("C:\Documents and Settings\jfritzsche\My Documents\My Pictures\Docubase Projects\transparent logo.gif", 90, 175, 0, 0)
guisetstate(@sw_show)
.
.
.
;During FTP Transaction
GuiCtrlSetData($status, "Current Status: "&"Downloading " & $rarfilename & "Total Size: " & $ftpsize & "Total Transferred : " & @InetGetBytesRead)

I hope this helps. If I'm misunderstanding you, please expand.

Um, okay, I already tried that, but it's doing some funky screen rewrite when I do that.

Basically I want the end result to look like this:

Current Status: ;Status flag pulled from 1 of 9 different messages stored as variables.

Downloading <filename> Total Size: <filesize>

Total Transferred : <@inetgetbytesread>

That make better sense?

Edited by Paradox

Share this post


Link to post
Share on other sites

Um, okay, I already tried that, but it's doing some funky screen rewrite when I do that.

Basically I want the end result to look like this:

Current Status: ;Status flag pulled from 1 of 9 different messages stored as variables.

Downloading <filename> Total Size: <filesize>

Total Transferred : <@inetgetbytesread>

That make better sense?

You need to provide more code. GUICtrlSetData is not making your GUI flicker or perform whatever 'funky screen rewrite' you mention. If you put the GUICtrlSetData in this loop:
While @InetGetActive
        TrayTip("Downloading " & $rarfilename, "Total Size: " & $ftpsize & "Total Transferred : " & @InetGetBytesRead, 10, 16)
          Sleep(250)
    Wend
your GUI is flickering because it is updating every 250 ms. Instead, you'll need to initialize a timer or find another workaround so that your GUI updates every second or two.

Regards,

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