Sign in to follow this  
Followers 0
pegmanm

Incorrect use of Send?

3 posts in this topic

I'm a little stumped and I'm sure this is going to be easy so please bear with me.

The end result of all this is to save a file within an application with the file name of todays date.

So to test I have the two scripts below.

I'm seeing confusing results as follows.

$yDay = @YDAY

MsgBox(0, "Hello", "{" & $yDay & "}") ; Correctly gives me todays day(032) in the MsgBox

However

$yDay = @YDAY

Run("notepad.exe")

WinWaitActive("Untitled - Notepad")

;WinWaitActive("Save As")

Send("{" & $yDay & "}")

Correctly Opens Notepad but only types 0 into the window.

Why would the Send here drop the last two chars.? If that is what is actually happening and I'm not getting 0 for another reason.

Regards and thanks for all your help

Martin P

Share this post


Link to post
Share on other sites



Thanks for the double post..

But as i said in the other post..

This should be ok

$yDay = @YDAY
Run("notepad.exe")
WinWaitActive("Untitled - Notepad")
;WinWaitActive("Save As")
Send("" & $yDay & "")

Share this post


Link to post
Share on other sites

That's Great Thanks.

Sorry about the double post I got a Server 500 Error while posting and a refresh of my browser

must have re-posted.

Apologies again and thanks for your help.

Martin P

Thanks for the double post..

But as i said in the other post..

This should be ok

$yDay = @YDAY
Run("notepad.exe")
WinWaitActive("Untitled - Notepad")
;WinWaitActive("Save As")
Send("" & $yDay & "")

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