Jump to content
Sign in to follow this  
BOUNCER

If WinGetText = empty then abort

Recommended Posts

BOUNCER

i have a mailer that checks for text in another app and mails it every 6 hours, the problem is it mails it even if its empty...how do i do if wingettext = empty then skip and abort

Share this post


Link to post
Share on other sites
somdcomputerguy

Maybe

$text = WinGetText("Untitled -", "")
If $text = "" Then Exit

If by 'skip and abort', you don't want to exit the whole script, maybe use Keyword ExitLoop instead of just Exit


- 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
BOUNCER

alright that worked

If $text = "" Then 
    WinSetState($class, "", @SW_MINIMIZE)
    Exit
EndIf

my next problem is its running under a RDP (remote desktop) user and some of the functions dont seem to work properly spefifically this part

Send("{LALT}")

sleep(500)

ControlSend($class, "", "", "{UP}")

ControlSend($class, "", "", "{UP}")

ControlSend($class, "", "", "{UP}")

ControlSend($class, "", "", "{UP}")

ControlSend($class, "", "", "{ENTER}")

WinSetState($class, "", @SW_MINIMIZE)

it does minimize but by default the program minimizes into the task tray, but here i find it sitting in the task bar (which is not the programs behavior), and all the control sends never go through, this is when the rdp user is logged out, when logged in everything works fine, but when logged out i find this weird behavior

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  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.