Leaderboard
Popular Content
Showing content with the highest reputation on 02/08/2019 in all areas
-
[UDF] Some more string management routines
coffeeturtle and one other reacted to Jeep for a topic
Here is an other UDF for string handling : Date handling _StringDateConvert: convert a date from one format ("YMD", "MDY" or "DMY") to another. _StringIsDate: checks if a date with a given format is valid String management _StringCount: count of occurrences that appear in a string _StringFormatBytesSize: formatting a dimension expressed in bytes (bytes) in MB, TB, ...) _StringIsEndingWith: check if a string end with some characters _StringIsStartingWith: check if a string start with some characters _StringJoinArray: concatenate elements of an array to rebuild a string _StringPadLeft: filling a string with characters on the left _StringPadRight: fill a string with characters on the right _StringRemoveFrenchAccent: remove french accent _StringRemoveChars: deleting characters from a string _StringStrip: eliminate characters at the begin and/or at the end of a string _StringTitleCaseFrench: capitalize the first letter of each word with elimination of french accents _StringWSClean: simple replacement of "White Spaces", remove beginning and trailing spaces and multiple spaces removal Any comments, suggestions for improvement or constructive criticism are welcome. Below you will find the UDF and a demo program. JPD_String.zip2 points -
Renari, You appear not to have read the Forum rules since your arrival. Please do read them - particularly the bit about not discussing game automation - before you post again. This thread is now locked - PM me if it was not for a game, as looking for empty bottles could possibly be legitimate...... M232 points
-
Trying to Automate a task in iTunes
modern and one other reacted to Earthshine for a topic
for these types of modern applications, it's best to use UI Automation as described here. I will use it and do some testing.2 points -
Advice for Getting Started with Android Development
Xandy and one other reacted to JLogan3o13 for a topic
To get your feet wet with Android automation I would suggest Tasker. It's free, and easy to learn, but capable of a lot.2 points -
OutlookTools
falcontechnics reacted to water for a file
Version 0.6.0.0
1,294 downloads
Built on top of the OutlookEX UDF it offers some often needed extended functionality (import/export ics/vcf/csv files etc.) (former name: iCal UDF). Note: This is a beta version - script breaking changes may occur at any time! Prerequisite: OutlookEX UDF. Details about all functions can be found in the Wiki. ICS (iCalendar) import - Import iCal events from an ICS file to an Outlook calendar VCF (vCard) import - Import vCard contacts to an Outlook contacts folder CSV import - Import data from a CSV file and create Outlook items in a specified folder Export - Export Outlook items (contacts, appointments) in VCF, ICS, CSV or Excel format Links: https://tools.ietf.org/html/rfc5545 (ICS - iCalendar) https://tools.ietf.org/html/rfc6350 (VCF - vCard) Threads: General Help & Support Known Bugs: (last changed: 2019-01-22) None Things to come: (last changed: 2022-01-25) Support for EML mails (email contents as plain text in MIME format) will be added BTW: If you like this UDF please click the "I like this" button. This tells me where to next put my development effort1 point -
I see...Try Local $oSpans, $Count For $i = 1 to 2 $oSpans= _IETagNameGetCollection($oIE, "span") $Count = 0 For $oSpan In $oSpans If $oSpan.className = 'aciTreePush' Then $Count += 1 if $Count = $i then _IEAction ($oSpan, "click") Sleep (1000) ExitLoop Endif Endif Next Next1 point
-
Hi Xin, I see you are still working hard...Try this : Local $oSpans = _IETagNameGetCollection($oIE, "span") For $oSpan In $oSpans If $oSpan.className = 'aciTreePush' Then _IEAction ($oSpan, "click") ExitLoop Endif Next1 point
-
OutlookTools: Import/Export from/to iCal/vCard/CSV
argumentum reacted to water for a topic
Version 0.2.0.0 of the UDF has been uploaded. Have fun1 point -
Hello, 1) If you loose focus, then you can use WinActivate 2) Your loop seem to be correct, if you want to do that for life after hotkey press. If not, dont forget : ExitLoop Or even : If <Expression> Then ExitLoop EndIf At the end of your second loop: While (1) Sleep(1800000) ;<<<< Here WEnd I dont got Itunes installed on my pro laptop so if you can give us full windows info. So all peoples in my case can still help you about ControlClick($hWnd, "", "[CLASS:iTunesTableView]")1 point
-
How to disable/enable GUI application - (Moved)
Silent_Adventure reacted to caramen for a topic
Hello, From what i understand you're just trying to block user's inputs at a specified moment. You can check in the help file. This macro : Blockinput (1) Be carefull you need admin rights for this. Help file : #RequireAdmin #include <AutoItConstants.au3> Example() Func Example() ; Run Notepad Run("notepad.exe") ; Wait 10 seconds for the Notepad window to appear. Local $hWnd = WinWait("[CLASS:Notepad]", "", 10) ; Disable user input from the mouse and keyboard. BlockInput($BI_DISABLE) ; Wait for 2 seconds. Sleep(2000) ; Send the 'F5' key to the edit control of Notepad to display the date and time. The handle returned by WinWait is used for the "title" parameter of ControlSend. ControlSend($hWnd, "", "Edit1", "{F5}") ; Enable user input from the mouse and keyboard. BlockInput($BI_ENABLE) ; Wait for 2 seconds. Sleep(2000) ; Close the Notepad window using the handle returned by WinWait. WinClose($hWnd) ; Now a screen will pop up and ask to save the changes, the classname of the window is called ; "#32770" and simulating the "TAB" key to move to the second button in which the "ENTER" is simulated to not "save the file" WinWaitActive("[CLASS:#32770]") Sleep(500) Send("{TAB}{ENTER}") EndFunc ;==>Example To answer to the primary question: Your first script is not working becose you're not using the correct flag Try this one : #include <AutoItConstants.au3> ; Run Notepad Run("notepad.exe") ; Wait 10 seconds for the Notepad window to appear. Local $hWnd = WinWait("[CLASS:Notepad]", "", 10) ; Get GUI actual stat. $State = WinGetState($hWnd) ; Msg Actual stat MsgBox (0,'','OK:'&$State) Sleep (1500) ; Hide GUI WinSetState($hWnd, "", @SW_HIDE) ; Get GUI actual stat. $State = WinGetState($hWnd) ; Msg Actual stat MsgBox (0,'','OK:'&$State) Sleep (1500) ; Show Gui WinSetState($hWnd, "", @SW_SHOW) ;If $Stat = 13 Then ; ;EndIF To be familiar with all these flag and macro i recommand you to make some simple GUI and play with them. #include <AutoItConstants.au3> #include <GuiConstants.au3> $MyGui = GUICreate("test",300,300) $Button1 = GUICtrlCreateButton ( "Hit me!" , 100 ,100 ) $Button2 = GUICtrlCreateButton ( "Hit me!" , 100 ,130 ) GUICtrlSetState ($Button1 , $GUI_DISABLE ) GUISetState ( @SW_SHOW , $MyGui ) While (1) Sleep (10) ; Avoid CPU usage $GuiMsg = GUIGetMsg () ; Checking what is hapenning to $MyGui Switch $GuiMsg Case $GUI_EVENT_CLOSE Exit Case $Button1 ;Button1 GUICtrlSetState ($MyGui , @SW_DISABLE ) ; = Nothing Case $Button2 _MyFirstFunction () ; Enable Button1 EndSwitch WEnd Func _MyFirstFunction () GUICtrlSetState ($Button1 , @SW_ENABLE ) EndFunc Regards,1 point -
getting digits from stdout
spudw2k reacted to FrancescoDiMuro for a topic
@gcue If you want to get only the digits after the text 'Recommended "Track" dB change: ', just change the SRE pattern to: Recommended "Track" dB change: (-?\d{1,}\.?\d*)1 point -
Just to be clear: this is a bad idea as this will remove all user settings made for SciTE, not just the Color & fonts. Why not simply edit it or use SciTE indigo to reset those settings by loading the standard scheme? Jos1 point
-
Excel - load values from specific columns into array
AnonymousX reacted to kylomas for a topic
val75, Try the following... #include <Array.au3> #include <Excel.au3> #include <MsgBoxConstants.au3> OnAutoItExitRegister ( "_fini" ) local $st = timerinit() Local $oE = _Excel_Open() If @error Then Exit MsgBox($MB_SYSTEMMODAL,'Open Failed', @error & @lf & @extended) ; get columns and populate array Local $sWorkbook = @ScriptDir & "\Exceltest.xls" Local $oWB = _Excel_BookOpen($oE, $sWorkbook, Default, Default, True) If @error Then Exit MsgBox($MB_SYSTEMMODAL, "Error", "Error opening '" & $sWorkbook & "'." & @CRLF & "@error = " & @error & ", @extended = " & @extended) Local $aResult = _Excel_RangeRead($oWB, Default, $oWB.ActiveSheet.Usedrange.Columns("A:Z"), 2) local $aFinal[UBound($aResult)][3] for $1 = 0 to UBound($aResult) - 1 $aFinal[$1][0] = $aResult[$1][0] $aFinal[$1][1] = $aResult[$1][1] $aFinal[$1][2] = $aResult[$1][25] next ConsoleWrite('Time to get spreadsheet and populate final array = ' & timerdiff($st)/1000 & @CRLF) _arraydisplay($aFinal,'Final',default,default,default,'A|B|Z') func _fini() _Excel_Close($oE) endfunc The spread sheet is 6000 rows and runs as follows >"C:\Program Files (x86)\AutoIt3\SciTE\AutoIt3Wrapper\AutoIt3Wrapper.exe" /run /prod /ErrorStdOut /in "C:\Users\ADMIN010\Documents\help - Excel.au3" /UserParams +>16:07:38 Starting AutoIt3Wrapper v.14.801.2025.0 SciTE v.3.4.4.0 Keyboard:00000409 OS:WIN_7/Service Pack 1 CPU:X64 OS:X64 Environment(Language:0409) +> SciTEDir => C:\Program Files (x86)\AutoIt3\SciTE UserDir => C:\Users\ADMIN010\AppData\Local\AutoIt v3\SciTE\AutoIt3Wrapper SCITE_USERHOME => C:\Users\ADMIN010\AppData\Local\AutoIt v3\SciTE >Running AU3Check (3.3.13.19) from:C:\Program Files (x86)\AutoIt3 input:C:\Users\ADMIN010\Documents\help - Excel.au3 +>16:07:38 AU3Check ended.rc:0 >Running:(3.3.12.0):C:\Program Files (x86)\AutoIt3\autoit3.exe "C:\Users\ADMIN010\Documents\help - Excel.au3" --> Press Ctrl+Alt+Break to Restart or Ctrl+Break to Stop Time to get spreadsheet and populate final array = 1.05814865721724 +>16:07:43 AutoIt3.exe ended.rc:0 +>16:07:43 AutoIt3Wrapper Finished. >Exit code: 0 Time: 5.86 kylomas1 point