Leaderboard
Popular Content
Showing content with the highest reputation on 03/11/2021 in all areas
-
_GUICtrlListView_GetSelectedIndices()
pixelsearch and one other reacted to jpm for a topic
in fact the checking if done will identify an internal error from AutoIt code or perhaps Windows code. Almost all DllCall in the standard UDF have this checking and return to isolate an error. you can find that the @error is modify when they are multiple @error checking in the same function to identify where the error occur just looking at the @error value. if _SendMessage parameters arenot valid it can be @error: 1 = unable to use the DLL file, >>> "user32.dll" = Windows pb >>> UDF error certainly an Autoit internal error if a valid UDF has been used 2 = unknown "return type", 3 = "function" not found in the DLL file , 4 = bad number of parameters, 5 = bad parameter.2 points -
_GUICtrlListView_GetSelectedIndices()
mLipok reacted to pixelsearch for a topic
Hi everybody AutoIt 3.3.14.5 , File GuiListView.au3 , function _GUICtrlListView_GetSelectedIndices() Line #2618 : For $iItem = 0 To $iCount Shouldn't it be : For $iItem = 0 To $iCount - 11 point -
EasyCodeIt A cross-platform implementation of AutoIt Introduction: EasyCodeIt is an attempt at implementing a programming language which is backward compatible with a sub-set of AutoIt which would work across multiple platforms with many aspects being agnostic to the platform-specific differences. Currently the primarily targeted platforms are Linux and Windows, more platforms may be supported in the future as per popular demand. For example it should be easy enough to port to Unix-like platforms such as BSD and Mac with the help of maintainers who are familiar with them. The main motivation behind the creation of this project is the lack of a proper easy-to-use scripting language in Linux, while there are numerous scripting languages which natively support it, none of them are as user-friendly and easy to use as AutoIt. (The "Easy" in "EasyCodeIt" reflects this) There was a previous thread in which the project was originally started, but it got too big and the discussion is too cluttered and hard to follow for any new readers, here is the thread for those who are interested in reading it: Progress: Frontend β Tokenizer π§ Parser (work in progress) β Expressions π·ββοΈ Statements (current priority) Backend β° Interpreter (scheduled) I am currently working on expression parsing and syntax tree building. -- This section will be updated in the future with new progress. To stay notified π follow this thread to get update notifications (by using the "Follow" button on the top-right corner of this page) and ποΈ watch the GitHub repository to get any new activity on your feed. Code: The code is available on GitHub, please π star the project if you like it and would like to show your support, it motivates me a lot! (Also don't forget to π Like this post ) Chat: I created a room in Matrix (an open-source federated chat system) for EasyCodeIt, you can join it to chat with me and others who are in the room, it might be a good way to get the latest status updates from me You can preview the room without joining, and you don't need to be connected to it 24/7 like IRC. It works a bit like Slack for those who are familiar with it. Forum: I have created a dedicated forum to post more frequent updates, possibly in their own threads to better organize the discussion. Please sign-up and follow the blog section to get updates. By the way, you can also post pretty much anything there, both technical and non-technical stuff, it is intended to be a hangout for techies but not only for them. So casual discussions, funny cat videos etc. are allowed!1 point
-
This UDF allows to set an events handler for Mouse device. The beginning... I searched for a way to disable the Mouse Primary click, and be able to call some function when the click event is received... Big thanks to amel27 for this one, i only organized the whole stuff to UDF style. Example: #include <GUIConstantsEx.au3> #include "MouseOnEvent.au3" HotKeySet("{ESC}", "_Quit") _Example_Intro() _Example_Limit_Window() Func _Example_Intro() MsgBox(64, "Attention!", "Let's set event function for mouse wheel *scrolling* up and down", 5) ;Set event function for mouse wheel *scrolling* up/down and primary button *down* action (call our function when the events recieved) _MouseSetOnEvent($MOUSE_WHEELSCROLLDOWN_EVENT, "_MouseWheel_Events") _MouseSetOnEvent($MOUSE_WHEELSCROLLUP_EVENT, "_MouseWheel_Events") _MouseSetOnEvent($MOUSE_PRIMARYDOWN_EVENT, "_MousePrimaryDown_Event") Sleep(3000) ;UnSet the events _MouseSetOnEvent($MOUSE_WHEELSCROLLDOWN_EVENT) _MouseSetOnEvent($MOUSE_WHEELSCROLLUP_EVENT) _MouseSetOnEvent($MOUSE_PRIMARYDOWN_EVENT) ToolTip("") MsgBox(64, "Attention!", "Now let's disable Secondary mouse button up action, and call our event function.", 5) _MouseSetOnEvent($MOUSE_SECONDARYUP_EVENT, "_MouseSecondaryUp_Event", 0, 1) Sleep(5000) _MouseSetOnEvent($MOUSE_SECONDARYUP_EVENT) ToolTip("") EndFunc Func _Example_Limit_Window() Local $hGUI = GUICreate("MouseOnEvent UDF Example - Restrict events on specific window") GUICtrlCreateLabel("Try to click on that specific GUI window", 40, 40, 300, 30) GUICtrlSetFont(-1, 12, 800) GUICtrlCreateLabel("Press <ESC> to exit", 10, 10) GUISetState() _MouseSetOnEvent($MOUSE_PRIMARYDOWN_EVENT, "_MousePrimaryDown_Event", $hGUI) ;A little(?) bugie when you mix different events :( ;_MouseSetOnEvent($MOUSE_SECONDARYUP_EVENT, "_MouseSecondaryUp_Event", $hGUI) While 1 Switch GUIGetMsg() Case $GUI_EVENT_CLOSE ExitLoop Case $GUI_EVENT_PRIMARYDOWN MsgBox(0, "", "Should not be shown ;)") EndSwitch WEnd _MouseSetOnEvent($MOUSE_PRIMARYDOWN_EVENT) ;_MouseSetOnEvent($MOUSE_SECONDARYUP_EVENT) EndFunc Func _MouseWheel_Events($iEvent) Switch $iEvent Case $MOUSE_WHEELSCROLLDOWN_EVENT ToolTip("Wheel Mouse Button (scrolling) DOWN Blocked") Case $MOUSE_WHEELSCROLLUP_EVENT ToolTip("Wheel Mouse Button (scrolling) UP Blocked") EndSwitch Return $MOE_BLOCKDEFPROC ;Block EndFunc Func _MousePrimaryDown_Event() ToolTip("Primary Mouse Button Down Blocked") Return $MOE_BLOCKDEFPROC ;Block EndFunc Func _MouseSecondaryUp_Event() ToolTip("Secondary Mouse Button Up Blocked") EndFunc Func _Quit() Exit EndFunc Available Events Constants: ------------------------------------------ CHANGELOG: Download: Attached: MouseOnEvent_2.4.zip Old version: MouseOnEvent.zip - v2.3 MouseOnEvent_2.1.zip MouseOnEvent_2.0.zip MouseOnEvent_UDF_1.9.zip MouseSetOnEvent_UDF_1.8.zip MouseSetOnEvent_UDF_1.7.zip MouseSetOnEvent_UDF_1.6.zip MouseSetOnEvent_UDF_1.5.zip MouseSetOnEvent_UDF_1.4.zip MouseSetOnEvent_UDF_1.3.zip Previous downloads: 146 + 200 + 804 MouseOnEvent.zip MouseOnEvent.zip1 point
-
declare many labels at the same time
Musashi reacted to JockoDundee for a topic
maybe polyglotonus cross-posting should be allowed if the poster is reasonably fluent in both languages the communities do not substantially overlap the poster communicates and translates relevant comments between groups1 point -
declare many labels at the same time
argumentum reacted to Musashi for a topic
It's not that bad at all, just a matter of etiquette . The problem with crossposting is, that helpers spend their time without knowing about the respective responses in the other forum. Since we are all volunteers, time is precious and should not be wasted.1 point -
@NSearch Be careful now. It may happen that there is 2 days with the same number in the month because it is showing part of the previous and part of the next months. This is why I wanted to have an array. Here my finalized script : Local $sTargetDate = "2020/12/20" Local $sToday = _NowCalcDate() Local $iDateDiff = _DateDiff("M", StringTrimRight($sTargetDate, 2) & StringRight($sToday, 2), $sToday) For $i = 1 to $iDateDiff $sElement = _WD_FindElement($sSession, $_WD_LOCATOR_ByXPath, '//a[@id="calprev"]') _WD_ElementAction($sSession, $sElement, 'click') Sleep(800) Next Local $aElement = _WD_FindElement($sSession, $_WD_LOCATOR_ByXPath, '//a[@href="#' & Int(StringRight($sTargetDate,2)) & '"]', "", True) $sElement = (UBound($aElement) = 1 Or Int(StringRight($sTargetDate,2)) <= 15) ? $aElement[0] : $aElement[1] ConsoleWrite ("Date elem " & $sElement & @CRLF) _WD_ElementAction($sSession, $sElement, 'click') Please donate to this site instead of me. Thanks.1 point
-
I removed my post because it was inaccurate to say it was working. Now I am looking at using the arrow button to return back to the right month then select the right day. Something like this may work better : Local $sTargetDate = "2020/12/20" Local $sToday = _NowCalcDate() Local $iDateDiff = _DateDiff("M", StringTrimRight($sTargetDate, 2) & StringRight($sToday, 2), $sToday) For $i = 1 to $iDateDiff $sElement = _WD_FindElement($sSession, $_WD_LOCATOR_ByXPath, '//a[@id="calprev"]') _WD_ElementAction($sSession, $sElement, 'click') Sleep(800) Next $sElement = _WD_FindElement($sSession, $_WD_LOCATOR_ByXPath, '//a[@href="#' & Int(StringRight($sTargetDate,2)) & '"]', "", True) untested1 point
-
Does Autoit Support WPS office? - (Moved)
Wellwellwell reacted to Earthshine for a topic
Wps isnβt supported. Excel is Microsoft not wps1 point -
Why AutoIt, and not another language like C# or Python?
TheDcoder reacted to lIlIIlIllIIIIlI for a topic
i don't enjoy object oriented languages, but i can make stuff with c# and i understand python/js to some extent. i learned java in high school and c++ in computer science courses but hated them. what got me into autoit was when i was learning windows batch, i somehow discovered windows-specific scripting languages and it was quick to install and test out and i really liked it autoit is just an overall nice language, though it's underrated how simple yet powerful it is and many don't even know what it is, but that's alright1 point -
_Excel_RangeRead return 0 when read text file
Wellwellwell reacted to Subz for a topic
As Nine mentioned: Local $oWorkbook = _Excel_BookOpenText($Excel_1, $Workbook, ...) _Excel_RangeRead($oWorkbook, ...) not _Excel_RangeRead($Workbook, ...)1 point -
Pass variables from AutoITX C# to au3 script.
Earthshine reacted to argumentum for a topic
so..., wassup Doc. Say, why not write an AutoIt script and IPC back and forth with the C# ?. It'll be better than all this AutoItX, as AutoIt has more stuff. ( my 2 cents. )1 point -
Try changing the $iReturn to $FLTAR_FILES(1) + Hidden(4) + System Files(8) example: Local $aFiles = _FileListToArrayRec("C:\", "*.lnk", 13, 1, 1, 2)1 point
-
_Excel_RangeRead return 0 when read text file
Wellwellwell reacted to Nine for a topic
Please use this tool when you post code. You were mixing string and object : #include <Excel.au3> Local $Excel_1 = _Excel_Open() Local $sWorkbook = @ScriptDir & "\Test.txt" Local $oWorkbook = _Excel_BookOpenText($Excel_1, $sWorkbook);, Default, $xlDelimited, Default, True, "|", $aFieldInfo, ",", ".") ConsoleWrite (@error & @CRLF) ; WinActivate($Workbook) Local $read2 = _Excel_RangeRead($oWorkbook, Default, "A2") MsgBox(0,"Read",$read2) Local $Excel_2 = _Excel_Open() Local $pWorkbook2 = @ScriptDir & "\Test.xls" Local $Workbook2 = _Excel_BookOpen($Excel_2, $pWorkbook2) ;WinActivate($Workbook2) _Excel_RangeWrite($Workbook2, Default, $read2, "D1") Edit : adding some error handling helps understand what the problems are1 point -
_GUICtrlListView_GetSelectedIndices()
pixelsearch reacted to Nine for a topic
Do we even need a _GUICtrlListView_GetItemCount ? Because GUICtrlSendMsg($idListView, $LVM_GETNEXTITEM, $iStart, $LVNI_SELECTED) will return an error eventually, no ? Func _GUICtrlListView_GetSelectedIndicesEX($idLV) Local $iIdx = -1 ; -1 to find the first item that matches the specified flags (msdn) ; the specified item itself is excluded from the search (+++) While True $iIdx = GUICtrlSendMsg($idLV, $LVM_GETNEXTITEM, $iIdx, $LVNI_SELECTED) If $iIdx = - 1 Then ExitLoop ConsoleWrite ($iIdx & @CRLF) ; do here what needs to be done WEnd EndFunc1 point -
Not working for me, eci.exe returns empty string. I use Win 10 Home x64.0 points
-
_Excel_RangeRead return 0 when read text file
Wellwellwell reacted to FrancescoDiMuro for a topic
Which it has already been suggested, but seems that the OP is a "post and quit" fan.0 points