elmer92413 0 Posted February 2, 2005 I have some real basic code that is dependent on my arrays...WinWaitActive("Microsoft Excel - Voice Mailboxes.xls") Sleep(2000) Global $array Do Send("^C") $clipboard = ClipGet() $array = StringSplit($clipboard, ",") ClipPut(""& $array[2]" "& $array[1]) Send("^V") Send("{DOWN}") Until $clipboard = ""I get the following message...Error MessageAll I want to do is take a field which has a name...Last, First...And I want to flip them around...Then move down to the next cell and repeat until it reaches an empty cell... Share this post Link to post Share on other sites
SlimShady 1 Posted February 2, 2005 (edited) This should help you. Edit: Check line 9. I changed it because it was going to throw an error. WinWaitActive("Microsoft Excel - Voice Mailboxes.xls") Sleep(2000) Global $array While 1 Send("^C") $clipboard = ClipGet() If $clipboard <> "" AND StringInStr($clipboard, ",") Then $array = StringSplit($clipboard, ",") ClipPut($array[2] & " " & $array[1]) Send("^V") Send("{DOWN}") Else ExitLoop EndIf WEnd Edited February 2, 2005 by SlimShady Share this post Link to post Share on other sites
pcdestroyer 1 Posted February 2, 2005 (edited) Dim [Const] $variable Dim $array[subscript 1]...[subscript n] Parameters const [optional] If present, the Const keyword creates a constant rather than a variable. $variable The name of the variable to declare. subscript The number of elements to create for the array dimension, indexed 0 to n-1. Remarks The Dim/Local/Global keywords perform a similar function. 1. Declare a variable before you use it (similar to VBScript) 2. Create an array ; Example 2 - Declaring arrays Dim $weeklyWorkSchedule[$daysWorking] Global $chessBoard[8][8] Local $mouseCoordinates[2], $windowStats[4] Global $array[2] Edit: i think u have to use $array[0] and $array[1] ... not 1 and 2 Edited February 2, 2005 by pcdestroyer Share this post Link to post Share on other sites