Bean07 Posted November 1, 2017 Share Posted November 1, 2017 Hi guys please help me convert my code to autoit here is the vbs: Set wshshell = wscript.CreateObject("WScript.Shell") IID = InputBox("IID") wscript.sleep 1000 wshshell.sendkeys IID Link to comment Share on other sites More sharing options...
spudw2k Posted November 1, 2017 Share Posted November 1, 2017 (edited) A line by line conversion ;Set wshshell = wscript.CreateObject("WScript.Shell") ;Unnecessary as AutoIt has a built-In function to send kestrokes without instantiating a COM object ;IID = InputBox("IID") $IID = InputBox("","IID") ;wscript.sleep 1000 Sleep(1000) ;wshshell.sendkeys IID Send($IID) ...however, I don't see the point of this demo? Prompt for keys, just to send them again? I assume you have bigger things in mind, so you might learn something more meaningful if you ask for pointers on how to accomplish what you want --end state...the more specific the better. Also, don't expect the members here (myself included) to just spew out a script for you. This one was simple enough to convert, but don't be surprised if you are asked to show some initiative in the future. Your help file and google is your friend. Notice how similar the commands/context were to convert your code; that information could have easily been found in the help file or searching otherwise. Good luck and let us know when you get stuck. Edited November 1, 2017 by spudw2k Spoiler Things I've Made: Always On Top Tool ◊ AU History ◊ Deck of Cards ◊ HideIt ◊ ICU ◊ Icon Freezer ◊ Ipod Ejector ◊ Junos Configuration Explorer ◊ Link Downloader ◊ MD5 Folder Enumerator ◊ PassGen ◊ Ping Tool ◊ Quick NIC ◊ Read OCR ◊ RemoteIT ◊ SchTasksGui ◊ SpyCam ◊ System Scan Report Tool ◊ System UpTime ◊ Transparency Machine ◊ VMWare ESX BuilderMisc Code Snippets: ADODB Example ◊ CheckHover ◊ Detect SafeMode ◊ DynEnumArray ◊ GetNetStatData ◊ HashArray ◊ IsBetweenDates ◊ Local Admins ◊ Make Choice ◊ Recursive File List ◊ Remove Sizebox Style ◊ Retrieve PNPDeviceID ◊ Retreive SysListView32 Contents ◊ Set IE Homepage ◊ Tickle Expired Password ◊ Transpose ArrayProjects: Drive Space Usage GUI ◊ LEDkIT ◊ Plasma_kIt ◊ Scan Engine Builder ◊ SpeeDBurner ◊ SubnetCalcCool Stuff: AutoItObject UDF ◊ Extract Icon From Proc ◊ GuiCtrlFontRotate ◊ Hex Edit Funcs ◊ Run binary ◊ Service_UDF Link to comment Share on other sites More sharing options...
Bean07 Posted November 2, 2017 Author Share Posted November 2, 2017 On 11/1/2017 at 2:48 PM, spudw2k said: A line by line conversion ;Set wshshell = wscript.CreateObject("WScript.Shell") ;Unnecessary as AutoIt has a built-In function to send kestrokes without instantiating a COM object ;IID = InputBox("IID") $IID = InputBox("","IID") ;wscript.sleep 1000 Sleep(1000) ;wshshell.sendkeys IID Send($IID) ...however, I don't see the point of this demo? Prompt for keys, just to send them again? I assume you have bigger things in mind, so you might learn something more meaningful if you ask for pointers on how to accomplish what you want --end state...the more specific the better. Also, don't expect the members here (myself included) to just spew out a script for you. This one was simple enough to convert, but don't be surprised if you are asked to show some initiative in the future. Your help file and google is your friend. Notice how similar the commands/context were to convert your code; that information could have easily been found in the help file or searching otherwise. Good luck and let us know when you get stuck. Thank you! its worked 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