kjcdude Posted November 24, 2007 Posted November 24, 2007 (edited) I need to create a cleaner way to get the last 3 characters of a PC name. Below is how i do it currently, but it's pretty sloppy. run("C:\WINDOWS\system32\notepad.exe") sleep(500) If Not WinActive("Untitled - Notepad","") Then WinActivate("Untitled - Notepad","" WinWaitActive("Untitled - Notepad","") EndIf send(@ComputerName) sleep(100) If Not WinActive("Untitled - Notepad","") Then WinActivate("Untitled - Notepad","" WinWaitActive("Untitled - Notepad","") EndIf send("{shiftdown}{left}{left}{left}{shiftup}{ctrldown}c{ctrlup}") sleep(500) $compnum = ClipGet() WinClose("Untitled - Notepad","") send("{right}{enter}") Edited November 24, 2007 by kjcdude
Emperor Posted November 24, 2007 Posted November 24, 2007 MsgBox(0, "Notice", StringRight(@ComputerName, 3))
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