Sign in to follow this  
Followers 0
drbarry920

Scirpt Paused

14 posts in this topic

#1 ·  Posted (edited)

I have created a script to automatically read information from a window in one program and then interact with buttons in another window from another program. When I run the script it automatically pauses. When I right click the autoit icon down by my clock the "Script Paused" is checked. I can not uncheck it so I can't run the script.

Any suggestions?

Thanx

Barry

Edited by drbarry920

Share this post


Link to post
Share on other sites



Welcome to the forums! Could you please post your code?

Generally for a script that doesn't pause when it's started, clicking on the tray icon will then pause it but clicking the 'Script Paused' menu entry should unpause it.

Share this post


Link to post
Share on other sites

I've attached the code. Let me tell you what I want to create. When playing online poker I use a program called No Hands Holdem that gives suggested actions based on the cards shown by calculating odds for you.

This information is a text word located (Using the AUtoIt WIndow Info) at WindowsForm10.STATIC.app319. There are 5 possibilities.

I want to then automatically press the appropriate button on the poker server that

corresponds with the action suggested in the 1st program.

I've put together the code based on the help that comes with AUto it.

Thanx for your help.

Barry

poker.txt

Share this post


Link to post
Share on other sites

When an AutoIt script is officially paused, the tray icon will alternate between the AutoIt logo and a red X. After looking at your script it seems that this isn't happening, but that your code is stopping at this spot:

; Wait for the window of table to become active 
WinWaitActive($tablename1) 
WinWaitActive($tablename2)

What's happening here is that you are waiting for the 'Table 32371' to be the window with focus and then you immediately tell AutoIt to wait until the 'Hold'em' window has focus.

I believe that your intention is to pause the script at that point until both windows exist, so changing these lines to WinWait() should fix your problem.

Some other observations:

  • $CheckButton and $CallButton appear to point to the same control, as do $BetButton and $RaiseButton. Is this right?
  • You shouldn't need the PixelCoordMode line because you're not working with coordinates.
  • I really, really like the way you've assigned all those cryptic control names to variables. It's a really good habit to get into right from the start. :)

Share this post


Link to post
Share on other sites

This script has been on here a bunch of times... You could get some good ideas from searching the forum, Just out of curiousity, why are you using 2 table names if you only use 1: The first one: Global $tablename1 = "Table 32371" , so as LXP suggested try it like this:

Opt("WinTitleMatchMode", 4); note this
WinWait($tablename1)
If Not Winactive($tablename1) Then WinActivate($tablename1)
; rest of your script

It seems that the .50/1.00 is the rest of the title, which all you need is the first couple of words that you have in $tablename1.

Good Luck :)


Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

Share this post


Link to post
Share on other sites

Don't I need to table names if I am using two separate programs?

Share this post


Link to post
Share on other sites

Hello,

I did as suggested and the Script Paused is still checked and the scirpt is not pressing the buttons basd on the suggestions in the other program.

ANy other suggestions? I've reattached the scirpt with the changes

Thanx

Barry

poker.txt

Share this post


Link to post
Share on other sites

You do need two different variables -- I think the confusion arose from the existence of two threads on this matter (more or less).

To keep the thread appropriate to its title, could you please confirm that WinWait() solves your problem of the script pausing and then we'll continue any other discussion in the other thread?

Share this post


Link to post
Share on other sites

1st, you never call the 2nd tablename... so what do you need it for?

2nd, the pokerbotpro script your using was based on Online Hold'em Inspector, I don't know what '"WindowsForm10.STATIC.app314"' this is, and have never heard of No Hands Hold'em to help you.

The "Action" is the "Action" that the "Brain" Client gives you: ie... Fold / Check / Call / Bet / Raise.

$tablename2 should be the Title of the "Brain" Client you want to read.

Right now your script will do absolutely nothing, because it'sn not told to.

You have the controls right for Party Poker, those were done by pokerbotpro, but that's about where it stops.

Now you have to dig deeper to see how to get the information from the "Brain" Client.

Good Luck


Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

Share this post


Link to post
Share on other sites

Quick Draw Mc-LxP... it was tie, but beat me by seconds...lol


Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

Share this post


Link to post
Share on other sites

This is the focus of the other thread. Let's talk about this there!

Share this post


Link to post
Share on other sites

ANy other suggestions?  I've reattached the scirpt with the changes

<{POST_SNAPBACK}>

That script is identical to the one you originally posted! :)

As above, changing your WinWaitActive() lines to WinWait() should fix your pausing problem.

Share this post


Link to post
Share on other sites

That script is identical to the one you originally posted! :)

As above, changing your WinWaitActive() lines to WinWait() should fix your pausing problem.

I am also having the same problem,script paused in my tray(near clock).

What should i do?

I am attaching my .au3 file.

Very new to autoit.First time user.

ImTOO Video Editor (Unregistered).au3

Share this post


Link to post
Share on other sites

#14 ·  Posted (edited)

I am also having the same problem,script paused in my tray(near clock).

What should i do?

I am attaching my .au3 file.

Very new to autoit.First time user.

I'm sure you'll get slapped for hijacking this thread, but, is 'video-editor' the correct name for an executable on your computer? The script is probably 'pausing' on one of those WinWaitActive's, or maybe the Run command is wrong. Also, the syntax is wrong here, Send("enter"), it should be Send("{ENTER}"). Edited by snowmaker

- Bruce /*somdcomputerguy */  If you change the way you look at things, the things you look at change.

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