; ; AutoIt Version: 3.0 ; Language: English ; Platform: Win9x/NT ; Author: Jonathan Bennett (jon@hiddensoft.com) ; ; Script Function: ; Opens Notepad, types in some text and then quits. ; The text typed shows two ways of Sending special ; characters ; #include #include #Include ; Prompt the user to run the script - use a Yes/No prompt (4 - see help file) ; Check the user's answer to the prompt (see the help file for MsgBox return values) ; If "No" was clicked (7) then exit the script $message = "Hold down Ctrl or Shift to choose multiple files." $Form1 = GUICreate("AForm1", 622, 200, 192, 50) $Button1 = GUICtrlCreateButton("Choose File", 80, 40, 81, 25) GUISetState(@SW_SHOW) While 1 $msg = GuiGetMsg() Select Case $msg = $GUI_EVENT_CLOSE Exit Case $msg = $Button1 $var = FileOpenDialog($message, "", "SpreadSheet (*.csv)", 1 + 4 ) ;MsgBox(4096,"","You chose " & $var) ExitLoop Case Else ;;;;;;; EndSelect WEnd $path = "1" $FilePath = $var sleep(100); If Not FileExists($FilePath) Then MsgBox(0, "error", "File doesn't exist or can't be read") Exit EndIf ; Activate illustrator WinActivate("[Class:illustrator]"); ; Wait for the Illustrator become active sleep(500); WinWaitActive("[Class:illustrator]") sleep(100); Send("M"); MouseClick ( "left" , 18, 276, 1 ) ;choose rectangle tool HotKeySet("{Esc}", "captureEsc") Func captureEsc() ; ... can do stuff here exit; EndFunc For $count = 1 to _FileCountLines($FilePath) Step 1 $string = FileReadLine($FilePath, $count) $input = StringSplit($string, ",", 1) $start = $input[1] $length = $input[2] $colour = $input[3] MouseClick ( "left" , 859, 439, 1 ) ;centre of screen WinWaitActive("[Title:Rectangle]") sleep(100); Send($length & "{TAB}" & "100" & "{TAB}{ENTER}") MouseClick ( "left" , 14, 808 , 2 ) ;colour screen WinWaitActive("[Title:Color Picker]") sleep(500); Send($colour & "{ENTER}") MouseClick ( "left" , 883, 47 , 2 ) ;xtab sleep(100); Send($start & "{ENTER}") MouseClick ( "left" , 981, 47 , 2 ) ;ytab sleep(100); Send("-" & $length & "{ENTER}") Next