Jump to content

User input


Recommended Posts

Hello

This is my first post on the forum, I just started using AutoIt. My first task with AutoIt is to create a script to delete a job from a system with use at the hospital I work at. It requries to know the user name of the person running the job. I am looking to have it prompt me for the username with a inputbox. Then take the name I enter the box and use the send command to later enter the name. I was trying Local $n1 = InputBox ("Delete Meditech Job", "Enter username") then send ("n1)" with no luck any help.

Thanks

Flint

Edited by flint165
Link to comment
Share on other sites

Post your code, or it's difficult to know.

But my ESP tells me that you need to hold $n1 in a Global variable, unless you are immediately

passing it to the "delete" function from the "get username" function.

Edited by JohnOne

AutoIt Absolute Beginners    Require a serial    Pause Script    Video Tutorials by Morthawt   ipify 

Monkey's are, like, natures humans.

Link to comment
Share on other sites

Here it is thanks for the help

Local $n1 = InputBox ("Delete Meditech Job", "Enter username","")

Run ("C:\Program Files\MEDITECH\Workstat\T.EXE")

Sleep (5000)

Send ("{ENTER}")

SLEEP (3000)

Send ("1")

Send ("{ENTER}")

SLEEP (2000)

Send ("MY LOGIN")

Send ("{ENTER}")

SLEEP (500)

Send ("33ram")

Send ("{ENTER}")

Send ("10")

Send ("{ENTER}")

SLEEP (3000)

Send ("MY PASSWORD")

Send ("{ENTER}")

SLEEP (2000)

Send ("1")

Send ("{ENTER}")

Send ("2")

Send ("{ENTER}")

SLEEP (1000)

Send ("{ENTER}")

Send ("A")

Send ("{ENTER}")

Send ("{ENTER}")

Send ("$n1")

Send ("{F12}")

SLEEP (9000)

Send ("{SHIFTDOWN}")

Send ("{RCTRL}")

Send ("{SHIFTUP}")

Link to comment
Share on other sites

These type of scripts are notoriously shaky at best, and it's difficult to see what it is

supposed to do.

I'm going to have to guess again and ask if the line..

Send ("$n1")

is what you are having problems with ?

And if so, what is it sending?

In any case, please explain exactly the problem.

AutoIt Absolute Beginners    Require a serial    Pause Script    Video Tutorials by Morthawt   ipify 

Monkey's are, like, natures humans.

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