flint165 Posted March 7, 2012 Share Posted March 7, 2012 (edited) 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 March 7, 2012 by flint165 Link to comment Share on other sites More sharing options...
JohnOne Posted March 7, 2012 Share Posted March 7, 2012 (edited) 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 March 7, 2012 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 More sharing options...
flint165 Posted March 7, 2012 Author Share Posted March 7, 2012 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 More sharing options...
JohnOne Posted March 7, 2012 Share Posted March 7, 2012 These type of scripts are notoriously shaky at best, and it's difficult to see what it issupposed 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 More sharing options...
flint165 Posted March 7, 2012 Author Share Posted March 7, 2012 Yes the Send ("$n1") is the problem, it is sending $n1. I am trying to get that to be what ever the I type in the Inputbox Link to comment Share on other sites More sharing options...
JohnOne Posted March 7, 2012 Share Posted March 7, 2012 TrySend ($n1) 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 More sharing options...
flint165 Posted March 8, 2012 Author Share Posted March 8, 2012 Thx:) Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now