Leaderboard
Popular Content
Showing content with the highest reputation on 09/06/2019 in all areas
-
You can try this: _WD_ElementAction($sSession,$sButton_TAGS,'value', $string_split[$z] & "\uE006") p.s. have a look here: https://w3c.github.io/webdriver/#keyboard-actions1 point
-
You set the option for TrayOnEventMode, you can't use the message loop if you do that. Just delete that option line and see if it's working now.1 point
-
The one thing I liked about AutoIt, and most scripting languages, is that you don't have to compile it before you can run it. You just run the code, and if there's an error, it's easy to fix it and run it to test it again. There's no waiting for the compiler to run, no need for anything else to happen, they just run. The second best thing I love about AutoIt is that it's case insensitive for variables and function names. I know a lot of people cringe when they see that, but too bad, I like it. Also, no stupid line endings like in a C/C++ program, I mean seriously, what is the semi colon for? What semi-literate programmer ever uses a run on line of code, and why allow it in the first place?1 point
-
AZWPlug updated, to v5.8, see Post #3. This includes all of AZWDrop v2.9 (source & exe). BUGFIX etc. (v5.8) BUGFIX for adding any missing 'kfx-zip' file to Calibre. Opening the 'My Kindle Content' folder, via button with CTRL held down, will now present a program Close query. Button added (at top) for opening the folder containing the selected ebook ... a sub-folder located in the 'My Kindle Content' folder, or that folder. NOTE - The BUGFIX is in regard to re-sending the ebook after initial processing, where the program created 'kfx-zip' file has been removed. In short, it sends the AZW file instead, and the appropriate calibre plugin (must be installed) creates the 'kfx-zip' file on-the-fly to allow addition to calibre (see the MobileRead Forum for detail).1 point
-
Add Book & All Formats To Calibre v3.8, see Post #4. RE-UPPED. My apologies to the two downloaders. Had to fix a minor bug I discovered today, and then re-upload ... not worth a version number change. NOTE - The bug could be bypassed by one of the new options, which is why I missed it in testing and fixing ... normally you have that option disabled (the default), but I had it enabled to fix what an earlier (pre-release update) version of the bug had caused with some of my recent ebook additions to calibre. It wasn't until my latest ebook additions today, that I discovered a missed section of the bug, that I'd overlooked ... oops ... just an issue regarding what calibre library to check, and only with regard to KFX files. It only impacted you if you were adding to a non default calibre library.1 point
-
I use this to be able to write to console in any case (compiled or not): Global $CW = @Compiled ? __ConsoleWrite : _ConsoleWrite Func __ConsoleWrite(ByRef $s) Local Static $hCon = __ConsoleInit() DllCall("kernel32.dll", "bool", "WriteConsoleW", "handle", $hCon, "wstr", $s & @LF, "dword", StringLen($s) + 1, "dword*", 0, "ptr", 0) Return EndFunc ;==>__ConsoleWrite Func __ConsoleInit() DllCall("kernel32.dll", "bool", "AllocConsole") Return DllCall("kernel32.dll", "handle", "GetStdHandle", "int", -11)[0] EndFunc ;==>__ConsoleInit ; Unicode-aware ConsoleWrite Func _ConsoleWrite($s) ConsoleWrite(BinaryToString(StringToBinary($s & @LF, 4), 1)) EndFunc ;==>_ConsoleWrite I setup the SciTE console to Unicode, so that's why the last function is needed. Use it like that: $CW("some text" & @LF)1 point
-
Add Book & All Formats To Calibre updated to v3.8, see Post #4. New dropbox screenshot added. (v3.8) Added the ability to ADD ebook(s) to a specific calibre library. Check added for missing KFX files for existing ebooks in calibre library. END key can now be held down, to get an exit query during multiple ebook adding. NOTE - Current process must finish first. Number of KFX files added is now reported. (v3.7) A book count number is now displayed on relevant ADD splash and dialogs.1 point
-
Help with looping a search for a pixel color (with hotkey)
East_Arctica reacted to BrewManNH for a topic
You don't need to use the Call function to call a function, it's redundant. Here's a modified script that might work as intended. #include <AutoItConstants.au3> HotKeySet("{esc}", "Loop") HotKeySet("{tab}", "_Exit") $Paused = 0 ;~ Loop() While 1 If Not $Paused Then ConsoleWrite("Searching" & @LF) $coord = PixelSearch(0, 0, 100, 200, 0xB200) If Not @error Then MouseClick($MOUSE_CLICK_LEFT, $coord[0], $coord[1], 2, 1) MsgBox(0, " Clicked at X:", $coord[0] & "and Y:" & $coord[1]) EndIf Sleep(1000) ; <<<< Sleeps for 1 second before searching again Else ConsoleWrite("Paused" & @CRLF) Sleep(1000) ; << Used so it's not spamming the console all the time EndIf WEnd Func Loop() $Paused = Not $Paused EndFunc ;==>Loop Func _Exit() Exit EndFunc1 point -
Copy with LOG when new file detected
ProgrammingNoob reacted to alienclone for a topic
we were all noobs at one point, this is the place to learn. im on my way to bed at the moment, but you read those help files i linked to, and search using the link in my signature and come up with something that looks like a script and post it here then others will follow with help debugging YOUR SCRIPT. or you can wait for other members here who like doing other people's homework for them, you may get lucky and not have to learn a thing.1 point -
Why AutoIt, and not another language like C# or Python?
DaveScotese reacted to iamtheky for a topic
1) From idea on the shitter --> proof of concept is rarely measured in anything other than minutes. 2) The helpfile is gd amazing (which often facilitates #1). 3) people who have to maintain your uncommented code in the future get the luxury of 1 and 2.1 point -
Why AutoIt, and not another language like C# or Python?
EnigmaScript reacted to mLipok for a topic
I will answer by reverse your question. I do not know C# and do not know Python. From 2004 my only one programming language is AutoIt. I have my own small bussines and I hire 3 people. AutoIt scripts which I made for my clients, are generating about 1/4 of my company incomes. Why I should use other programming language ? EDIT: currently in 2020 I hire 4 people1 point -
AZWPlug updated, to v5.7, see Post #3. This includes all of AZWDrop v2.9 (source & exe). (v5.7) Another BUGFIX Update. BUGFIX for arrow buttons right-click option - 'Enable for Show Status'. The SHOW button now displays FOUND as the selected list when a result is returned. The FIND process now notifies if one match only on subsequent button clicks. UP and DOWN arrows now cycle around last to first entry and vice-a-versa. ON TOP button relocated and a HOME button added (same as using HOME key to jump to first entry). CTRL with HOME button selects the last entry on list (same as using END key). Clicking a column header while SHIFT is held down, selects the first entry on the second half of the list. NOTES - One bugfix and a bunch of improvements. The bug was just me neglecting to pass a variable properly. I am guessing my original code worked and then I made it a function and I overlooked checking it all still worked ... appears that way at a guess. Anyway, it allowed me to add some other benefits I'd overlooked or forgotten.1 point
-
here is it: #AutoIt3Wrapper_Run_AU3Check=N ;~ ADODB.STREAM : StreamReadEnum ;~ https://msdn.microsoft.com/en-us/library/windows/desktop/ms679794(v=vs.85).aspx Global Enum _ $g__eADO_STREAM_adReadLine = -2, _ ; Reads the next line from the stream (designated by the LineSeparator property). $g__eADO_STREAM_adReadAll = -1 ; Default. Reads all bytes from the stream, from the current position onwards to the EOS marker. This is the only valid StreamReadEnum value with binary streams (Type is adTypeBinary). Global $oErrorHandler = ObjEvent("AutoIt.Error", "_ErrFunc") _Example_MAIN() Func _Example_MAIN() Local $oXML = ObjCreate("Microsoft.XMLDOM") _XML_Create_Example($oXML) ; $oXML.save(@ScriptDir & "\Create.xml") MsgBox(0, '', _XML_TIDY($oXML)) EndFunc ;==>_Example_MAIN Func _XML_Create_Example(ByRef $oXML) $oXML.loadxml("<MBNProfile/>") $oRoot = $oXML.selectSingleNode("//MBNProfile") $oNewElement1 = $oXML.createElement("test1") $oNewElement1.text = "SomeText1" $oNewElement2 = $oXML.createElement("test2") $oNewElement2.text = "SomeText2" $oNewElement3 = $oXML.createElement("test3") $oNewElement3.text = "SomeText3" $oRoot.appendChild($oNewElement1) $oRoot.appendChild($oNewElement2) $oRoot.appendChild($oNewElement3) ConsoleWrite(@CRLF) ConsoleWrite($oXML.xml & @CRLF) EndFunc ;==>_XML_Create_Example Func _XML_TIDY(ByRef $oXML) Local $oReader = ObjCreate("MSXML2.SAXXMLReader") Local $oWriter = ObjCreate("MSXML2.MXXMLWriter") Local $oStream = ObjCreate("ADODB.STREAM") Local $sXML_Return = '' With $oStream .Open .Charset = "ISO-8859-1" With $oWriter .indent = True .encoding = "ISO-8859-1" .output = $oStream EndWith With $oReader .contentHandler = $oWriter .errorHandler = $oWriter .Parse($oXML) EndWith .Position = 0 $sXML_Return = .ReadText($g__eADO_STREAM_adReadAll) EndWith ; CleanUp $oStream = '' $oReader = '' $oWriter = '' Return $sXML_Return EndFunc ;==>_XML_TIDY ; User's COM error function. Will be called if COM error occurs Func _ErrFunc($oError) ; Do anything here. ConsoleWrite(@ScriptName & " (" & $oError.scriptline & ") : ==> COM Error intercepted !" & @CRLF & _ @TAB & "err.number is: " & @TAB & @TAB & "0x" & Hex($oError.number) & @CRLF & _ @TAB & "err.windescription:" & @TAB & $oError.windescription & @CRLF & _ @TAB & "err.description is: " & @TAB & $oError.description & @CRLF & _ @TAB & "err.source is: " & @TAB & @TAB & $oError.source & @CRLF & _ @TAB & "err.helpfile is: " & @TAB & $oError.helpfile & @CRLF & _ @TAB & "err.helpcontext is: " & @TAB & $oError.helpcontext & @CRLF & _ @TAB & "err.lastdllerror is: " & @TAB & $oError.lastdllerror & @CRLF & _ @TAB & "err.scriptline is: " & @TAB & $oError.scriptline & @CRLF & _ @TAB & "err.retcode is: " & @TAB & "0x" & Hex($oError.retcode) & @CRLF & @CRLF) EndFunc ;==>_ErrFunc EDIT: based on: http://www.visualbasicscript.com/Formatting-of-XML-file-m77414.aspx also here is some intresting examples http://stackoverflow.com/questions/11144192/how-can-i-save-an-msxml2-domdocument-with-indenting-i-think-it-uses-mxxmlwrite http://stackoverflow.com/questions/6405236/forcing-msxml-to-format-xml-output-with-indents-and-newlines1 point