Jump to content

Stugist

Members
  • Posts

    5
  • Joined

  • Last visited

Everything posted by Stugist

  1. Well I'm an idiot. I just realized the machine I was testing this on did not fit the @ComputerName criteria specified in this script. D'oh! Changed one of the lines, testing now successful. Will work on the production script and test that. Thanks for the help guys!
  2. I'm still getting an error on run, though. I'll compile the script to run as an EXE, but when I try to run it I will get an undeclared variable error. Here is the revised script. Note the error occurs on line 7: ; Script to activate VCarve Pro ; *Run this script immediately after installing VCarve Pro 8* WinWait("VCarve Pro - License Information") If StringLeft(@ComputerName,3) = "KJH" Then Local $RegUserName = "Registered Name 1" Local $LicNum = "License Key 1" ElseIf StringLeft(@ComputerName,3) = "SJH" Then Local $RegUserName = "Registered Name 2" Local $LicNum = "License Key 2" EndIf ControlSend("VCarve Pro - License Information", "Registered User Name", "Edit1", $RegUserName) ControlSend("VCarve Pro - License Information", "Paste license code from clipboard", "Edit2", $LicNum)
  3. Class: Edit Instance: 1 Is this the information you need? I'm afraid I don't quite follow otherwise.
  4. >>>> Window <<<< Title: VCarve Pro - License Information Class: #32770 Position: 788, 318 Size: 521, 308 Style: 0x94C800CE ExStyle: 0x00010109 Handle: 0x00060246 >>>> Control <<<< Class: Instance: ClassnameNN: Name: Advanced (Class): ID: Text: Position: Size: ControlClick Coords: Style: ExStyle: Handle: >>>> Mouse <<<< Position: 968, 328 Cursor ID: 0 Color: 0xD4D0C8 >>>> StatusBar <<<< >>>> ToolsBar <<<< >>>> Visible Text <<<< Paste license code from clipboard Enter license code manually OK Cancel Registered User Name: License Code: >>>> Hidden Text <<<<
  5. Hello all. I'm relatively new to the AutoIt scripting world. A bit a background: I work for a K12 school district imaging machines and deploying software. IE, I script. A lot. I always know exactly what I want to do, however syntax is never my strong suite. Asking for some newbish help here. Problem: I want to automate a software activation screen for a particular program (VCarve Pro by Vectric). The reason I want to do this is to automate the deployment of this software and reduce the "hand-on" time for my techs responsible for making it happen. Here is my current code: ; Script to activate VCarve Pro ; *Run this script immediately after installing VCarve Pro 8* WinActivate ("VCarve Pro - License Information") If @ComputerName = "KJH*" Then Global $RegUserName = "Registered Name 1" Global $LicNum = "License Key 1" ElseIf @ComputerName = "SJH*" Then Global $RegUserName = "Registered Name 2" Global $LicNum = "License Key 2" EndIf Send ($RegUserName) Send ("{TAB}") Send ("{TAB}") Send ($LicNum) Send ("{ENTER}")First line is making sure the license window (attached in screenshot) is active on the desktop. The following function (I think?) -should- query the computer name of the machine this is being run on. If the name of the computer starts with "KJH", then it will set the two needed variables accordingly. Same deal with the next function. This is where I'm lost. I have no idea if I can wildcard the @ComputerName bit. Generally, I'm lost on it all. I -think- I have the right idea. When I try to run the script, I get an error that says I'm trying to use an undeclared variable. Any help would be appreciated!
×
×
  • Create New...