Jump to content

Help! Send doesn't work


Skoezzi
 Share

Recommended Posts

I got following code:

Send("#r")

WinWaitActive("Run")

Send("notepad.exe{Enter}")

WinWaitActive("Untitled -")

Send("Today's time/date is {F5}")

It works till he has to open notepad.exe. What do i do wrong?

Always when I try to send text to a inputfield, my script pauses.

Can anybody help me?

Link to comment
Share on other sites

Are the titles correct for your system ?

Try this example:

Opt('TrayIconDebug', 1)
Send("#r") 
WinWaitActive("Run")
Send("notepad.exe{Enter}")
Sleep(1000)
$title = WinGetTitle('')
WinWaitActive($title)
Send("Today's time/date is {F5}")
MsgBox(0, '', 'Title = ' & $title)

Edit: forget the & in code

Edited by MHz
Link to comment
Share on other sites

Are the titles correct for your system ?

Try this example:

Opt('TrayIconDebug', 1)
Send("#r") 
WinWaitActive("Run")
Send("notepad.exe{Enter}")
Sleep(1000)
$title = WinGetTitle('')
WinWaitActive($title)
Send("Today's time/date is {F5}")
MsgBox(0, '', 'Title = ' & $title)

Edit: forget the & in code

This code just opens a Run box. :P

What do you mean with : Are the titles correct for your system?

EDIT: It works! It were the titles indeed. Thanks mate!

Edited by Skoezzi
Link to comment
Share on other sites

This code just opens a Run box. :P

What do you mean with : Are the titles correct for your system?

As for titles, do they match correctly. You are running an English operating system ?

Perhaps the sleep was not long enough in last example.

Try your original code as set here and if it is stuck on a line then hover your mouse over the system tray icon to see which line is the problem.

Opt('TrayIconDebug', 1)
Send("#r") 
WinWaitActive("Run")
Send("notepad.exe{Enter}")
WinWaitActive("Untitled -")
Send("Today's time/date is {F5}")
Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...