I'm trying to write a script that moves copies excel cells into an array. I'll than manipulate the values and send array into another program.
I don't want range to be specific to a workbook, or sheet, or set of cells.
I want user to be able to highlight desired cells and to copy either normally ("Ctrl+C") or by a hotkey ("Alt+C").
Could someone help me with this?
I've tried to write the framework:
#include <Array.au3> #include <Excel.au3> #include <MsgBoxConstants.au3> HotKeySet("!v", "Pastedata") func Makearray() local $bArray() 'User has cells already copied 'Convert clipboard into an array 'I don't know how excel stores data to clipboard so don't know how to bring it into array _Arraydisplay($bArray) return $bArray end func func Pastedata() Local aArray 'make array based on assumption user has already copied a range to clipboard aArray = Makearray() 'paste code 'don't worry about this I got the rest end func
Did anyone tried to use Redis with AutoIT as store DB ?
Redis <-- more about it
Hey. I'm working on a new project and was wondering if there is a better way to "update" my Column E array.
Here is my code:
Local $nI = 0 ;Creates a name index of 0: nI = Name index Local $nII = 1 ;Creates a name index of 1 for second loop: nII = Name Index 2 For $iN = 0 To $IndexRows Step 1 ;Checks the roster for any names that appear twice For $iN2 = 0 To $IndexRows Step 1 if $d_Names[$nI] == $d_Names[$nII] And $d_Names[$nII] <> "" Then Local $timeSheetName = _ArraySearch($e_Names, $d_Names[$nI], 0, 0, 0, 0, 1) ;MsgBox($MB_SYSTEMMODAL, "Found it", $d_Names[$nI] & " In column E on Row " & $timeSheetName) Local $eI = $timeSheetName + 1 ;ConsoleWrite($timeSheetName & @CRLF) ;ConsoleWrite($eI & @CRLF) ;ConsoleWrite(@CRLF) _Excel_RangeInsert($OpenWorkbook.ActiveSheet, "E" & $eI & ":F" & $eI, $xlShiftDown) ;Inserts a empty cell in columns E and F. _Excel_RangeWrite($OpenWorkbook, $OpenWorkbook.ActiveSheet, $d_Names[$nII], "E" & $eI) ;Fills the empty cell in columns E with the doubled name $aArray_Index = 2 ;Array element counter For $Index = 2 To $IndexRows Step 1 ;Loops through every row in the Excel file unto no rows are found or a null row is found $Array_Value_E = _Excel_RangeRead($OpenWorkbook, Default, "E"&$Index) $e_names[$aArray_Index] = $Array_Value_E ;While the code loops every value in column E is stored in the E array (updating the array) $aArray_Index += 1 Next ExitLoop EndIf Next $nI += 1 $nII += 1 Next Basically, It checks a roster for people whose name appears twice then inserts a new "row" for that person because they work in two different departments.
I have to find that name however in Column E if two appear in column D. My code works but I think it is not as efficient as it could be.
Any ideas on how to improve the "update" for my array?
(once it finds the double names in Column D it then searches for that name by going name by name in the Column E array and once it finds it inserts a new row. However, the E array doesn't have that new row stored in it so I have to "update" the array to properly find the next name)
Any and all tips would be greatly appreciated.
NOTE: Just assume I'm opening the excel file properly please do not add that code in, it only complicates your answer.
Hello Im wondering if using this https://ohtejera.github.io/ImperiusAutoIt/#started
UDF can i make that I can control my windows application with phone?
like for example click button Start on android phone and then something would be done in my windows app?
How do I properly convert this to Autoit? This is a VBA macro that I recorded in Excel.
ActiveSheet.Outline.ShowLevels RowLevels:=2 I need this to close my subtotal once it is finished.
any help will be greatly appreciated.