Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 07/06/2020 in all areas

  1. No problem! And don't be ashamed, some disabilities can help you in ways. I'm a bit dyslexic (why is that word so hard to spell?) and I have some ADD tendencies. The ADD helps me concentrate in huge bursts without noticing it sometimes and complete lots of small things quickly at other times. I haven't found things that dyslexia helps with (yet), but I'm sure it makes me think about things differently (I think part of the reason I started programming was so I wouldn't have to deal with all of the numbers, especially in accounting), which is just part of what makes me who I am
    2 points
  2. Where they always are .... according to Ronald.
    2 points
  3. This UDF automates KeePass databases through the use of KPScript, a plugin for KeePass that is developed by the original author. This is something I've wanted for a long time. I really like KeePass and I really like using AutoIt, but I feel uncomfortable typing clear text passwords into my scripts. I can only get away with using Send("^!a") to try to get KeePass to input my passwords for me for so long. To download the UDF, head over to GitHub for now (this is easier for me to manage). When I get a release version, I'll update this post with more info and a link to download from the forums. Be sure to read the Notes section, and let me know of any issues, features, or praise you might have!
    1 point
  4. The Short Version: This set of well-annotated example scripts shows how to solve sudoku puzzles with simple, powerful bitmask functions applied on a massive scale, demonstrating both common solving techniques and highly-optimised brute-force. All you need is: to like sudoku's basic logic primary school maths to download & install this bundle (v1.2; 25 July 2020) and this #include file (v5.1+) the CrossFilter GUI
    1 point
  5. Clayson

    Query from text file

    @seadoggie01 SOLVED, THANKS GUY!!!
    1 point
  6. Just one Question: Is MacOS not a cross-platform candidate. And why?
    1 point
  7. I often use multiple webdriver sessions concurrently, but I never use WD_Shutdown to close one particular window because, if you do it, the chromedriver.exe is closed, which affects the remaining sessions. If you want to just close a window, you can do it with WD_Window($sSession, "close"). I usually have chromedriver.exe running in the background all the time even when I don't have any webdriver sessions.
    1 point
  8. Jos

    ShellExecute - (Moved)

    that should be: Global $DATA1 = "1245692581" ShellExecute("https://npiregistry.cms.hhs.gov/registry/search-results-table?number=" & $DATA1 & "&addressType=ANY") Jos
    1 point
  9. Jos

    ShellExecute - (Moved)

    Moved to the appropriate forum, as the AutoIt Example Scripts forum very clearly states: Moderation Team
    1 point
  10. You wouldn't believe how long I was waiting for a GUI to pop up... I agree with argumentum, a batch file would be great What are the requirements for running this on Linux? I have a Raspberry Pi or two I could boot up and test with
    1 point
  11. @argumentum You are right, JSON is just a potential format to output data, and I agree that the tokens are probably never going to see the light of the day... so JSON is pretty low on the priority list. However I will eventually add it as an output option for the final parsed source tree but that is far in the future.
    1 point
  12. Forget about JSONing anything. The token output is a tool while coding. Is fine as is. In any case those tokens are never going to see the light of day in the finished product anyway.
    1 point
  13. Thanks for testing and for the advice @argumentum, I wanted to quickly put out something that people can try, so this is not really a proper release, that is why you found a lack of any instructions in the downloads. Next time I will definitely put some more effort into it Yeah, I can completely understand, I find this method of outputting data awkward too, but I couldn't come up with anything better without adding more dependencies... originally I wanted the program to output the data in the JSON format, but since that requires me to use a library, I decided against that. Maybe in the future I will include JSON output Right now the program will just print out all of the tokens in my own DIY format. Also, you might find the token type "Word" a bit confusing, this is because I use the same type of token for both keywords (like If, While, Do, For, Break, Switch etc.) and functions (MsgBox) as they technically share the same syntax. During further parsing, these words will be properly split into functions and keywords. You are pretty close, there are many names for it in *nix land, but the most technically accurate term is shell script, because it is a script which is ran by a shell. A shell is nothing but a program which takes commands from the user in a terminal. Windows is a bit of a special case, because it has cmd.exe which acts both as a virtual terminal emulator (the black window) and as the command shell, atleast that is what I think is happening in Windows. In Linux we have a more obvious separation, we have different programs for the terminal and different shell programs that we can use according to our preferences. The overwhelming majority in Linux use the bash shell, so you are not really wrong Thanks!
    1 point
  14. S:\198464-a-cross-platform-implementation>eci test.au3 ---### TOKEN ###--- Type: Word Data: MsgBox ---### TOKEN ###--- Type: Bracket Data: ( ---### TOKEN ###--- Type: Number Data: 0 ---### TOKEN ###--- Type: Comma Data: , ---### TOKEN ###--- Type: String Data: this ---### TOKEN ###--- Type: Comma Data: , ---### TOKEN ###--- Type: String Data: that ---### TOKEN ###--- Type: Bracket Data: ) took me some time to "get it". Do include a sample script and a batch file ( for those like me ? ) @Echo OFF REM example batch eci.exe test.au3 pause and a bash file for those in Linux. ( i don't know Linux, I think is called a bash file ) Also the reference in the downloads to "https://www.autoitscript.com/forum/topic/198464-a-cross-platform-implementation-of-the-autoit-language/?do=findComment&comment=1459435" so those like me can find what is the download related to. Other than that, kudos.
    1 point
  15. #AutoIt3Wrapper_AU3Check_Parameters=-q -d -w 1 -w 2 -w 3 -w 4 -w 5 -w 6 -w 7 #include "GuiChildTabUDF.au3" Global $__iFlashWindowEx = 0 ; ..see _WM_SETCURSOR() tabGUI_OPTs("RandomColor", 1) ; ..to add coloring to the GUIs, for debug. ( Default is 0 ) tabGUI_OPTs("SetCtrlDbgCreateWidth", 1) ; tells the UDF to leave some space for the debug buttons ( see tabGUI_CtrlDbgCreate() ). ( Default is 0 ) tabGUI_Example() Func tabGUI_Example() ; tabGUI_Create() has the same parameters as GUICreate() ; ..just skip the styles, as those are handled by the function. tabGUI_Create("Parent/Children Example") ; the first GUI will have to be the parent tabGUI_CtrlDbgCreate("Show GUI array") ; All these are tabGUI_CtrlDbgCreate("Show OPT array") ; for debug and tabGUI_CtrlDbgCreate("Swap GUIs/LABELs") ; are not needed tabGUI_CtrlDbgCreate("Can Drag child") ; to use the UDF tabGUI_CtrlDbgCreate("Self CPU usage") ; These are called after a GUI is present. ; search for "SetResizing:" to understand the TITLE modification ( used for tabGUI_DockStr2Int() ) tabGUI_Create("SetResizing:LBWH;1", 400, 400, 20, 20) ; all other GUI will be child addSomeControls() tabGUI_Create("2", 400, 400, 60, 60) addSomeControls() ; multiple child in child example ; ..skip the width and heigth, to have the function calculate the values. tabGUI_Create("3", Default, Default, 200, 230) tabGUI_Create("4", Default, Default, 20, 20, Default, Default, $__a_tabGUI[@extended][$eGui_HWindowSelf]) tabGUI_Create("5", Default, Default, 20, 20, Default, Default, $__a_tabGUI[@extended][$eGui_HWindowSelf]) Local $hGUI = tabGUI_Create("6", Default, Default, 20, 20, Default, Default, $__a_tabGUI[@extended][$eGui_HWindowSelf]) ; ..the function returns the windows handle, just like GUICreate() would. ConsoleWrite('$hGUI = ' & $hGUI & ' - @extended: ' & @extended & ' ( @extended returns the GUI index in the array )' & @CRLF) addSomeControls() GUISetState(@SW_SHOW, $__a_tabGUI[1][$eGui_HWindowSelf]) ; Time to show the parent GUI GUISwitch($__a_tabGUI[1][$eGui_HWindowSelf]) ; and get focus. GUIRegisterMsg($WM_SETCURSOR, "_WM_SETCURSOR") ; for _WinAPI_FlashWindowEx() While 1 Sleep(1000000) ; ..no need to sleep() a minimum in this loop, as is just there to not close the script in this example. WEnd EndFunc ;==>tabGUI_Example Func addSomeControls() ; ..some controls to add to the example GUICtrlCreateButton("bttn 1", 10, 10, 55, 25) GUICtrlSetOnEvent(-1, "addSomeEvents") GUICtrlSetResizing(-1, $GUI_DOCKLEFT + $GUI_DOCKTOP + $GUI_DOCKWIDTH + $GUI_DOCKHEIGHT) GUICtrlCreateButton("bttn 2", 10, 35, 55, 25) GUICtrlSetOnEvent(-1, "addSomeEvents") GUICtrlSetResizing(-1, $GUI_DOCKLEFT + $GUI_DOCKTOP + $GUI_DOCKWIDTH + $GUI_DOCKHEIGHT) GUICtrlCreateTab(10, 70, 380, 320) GUICtrlSetOnEvent(-1, "addSomeEvents") GUICtrlSetResizing(-1, $GUI_DOCKRIGHT + $GUI_DOCKTOP + $GUI_DOCKLEFT + $GUI_DOCKBOTTOM) GUICtrlCreateTabItem("TabSheet1") GUICtrlCreateTabItem("TabSheet2") GUICtrlCreateTabItem("") EndFunc ;==>addSomeControls Func addSomeEvents() ;~ $__iFlashWindowEx = TimerInit() MsgBox(0, "your ""OnEvent""", "@GUI_CtrlId = " & @GUI_CtrlId, 1, $__a_tabGUI[1][$eGui_HWindowSelf]) ;~ $__iFlashWindowEx = 0 EndFunc ;==>addSomeEvents Func _WM_SETCURSOR($hWnd, $iMsg, $wParam, $lParam) #forceref $hWnd, $iMsg, $wParam ; FYI: this is meant to flash the Parent GUI of a MsgBox(), ; so the MsgBox() needs a Parent GUI declaration. ; If the 0xFFFE guess don't work, or just wanna save CPU cycles, then you'll need a trigger. ; Maybe something like this below. ;~ If $__iFlashWindowEx = 0 Then Return $GUI_RUNDEFMSG ;~ If TimerDiff($__iFlashWindowEx) < 100 Then Return $GUI_RUNDEFMSG Local Static $hTimerTooSoon = TimerInit(), $hTimerWaitAMoment = TimerInit() If _WinAPI_LoWord($lParam) <> 0xFFFE Then $hTimerWaitAMoment = TimerInit() Return $GUI_RUNDEFMSG EndIf If TimerDiff($hTimerWaitAMoment) < 200 Then Return $GUI_RUNDEFMSG If TimerDiff($hTimerTooSoon) < 500 Then Return $GUI_RUNDEFMSG Local $mouse = _WinAPI_HiWord($lParam) ; https://docs.microsoft.com/en-us/windows/win32/menurc/wm-setcursor ; https://docs.microsoft.com/en-us/windows/win32/inputdev/wm-mousemove Local Const $MK_LBUTTON = 0x0001 Local Const $MK_RBUTTON = 0x0002 Local Const $MK_MBUTTON = 0x0010 Local Const $MK_XBUTTON1 = 0x0020 Local Const $MK_XBUTTON2 = 0x0040 ;~ If BitAND($mouse, $MK_LBUTTON) Then ConsoleWrite('- clicked MK_LBUTTON' & @CRLF) ;~ If BitAND($mouse, $MK_RBUTTON) Then ConsoleWrite('- clicked MK_RBUTTON' & @CRLF) ;~ If BitAND($mouse, $MK_MBUTTON) Then ConsoleWrite('- clicked MK_MBUTTON' & @CRLF) ;~ If BitAND($mouse, $MK_XBUTTON1) Then ConsoleWrite('- clicked MK_XBUTTON1' & @CRLF) ;~ If BitAND($mouse, $MK_XBUTTON2) Then ConsoleWrite('- clicked MK_XBUTTON2' & @CRLF) If BitAND($mouse, $MK_LBUTTON) Or BitAND($mouse, $MK_RBUTTON) Or _ BitAND($mouse, $MK_MBUTTON) Or BitAND($mouse, $MK_XBUTTON1) Or _ BitAND($mouse, $MK_XBUTTON2) Then $hTimerTooSoon = TimerInit() _WinAPI_MessageBeep(4) ; mimic what windows does by default when _WinAPI_FlashWindowEx($hWnd, 3, 6, 50) ; clicking the title. _WinAPI_FlashWindowEx(WinGetHandle("[CLASS:#32770;]"), 3, 6, 50) ; ..this works on the MsgBox() because is the "on top" in the Z order ; as the code just created it ( and it *is* on top ). EndIf Return $GUI_RUNDEFMSG EndFunc ;==>_WM_SETCURSOR This is a post of example(s). The code started due to the observation that controls don't look the same when in a tab control. Digging thru the forum I found chunks of code so I smash them together to solve my issues. The "UDF" is more of an useful include than an UDF, but it shows how to use Child GUIs instead of a TAB control. In each child GUI you can have a GUICtrlCreateTab(). ( something that I did not realize until I browse the Wiki ) Working on the code I found myself having to GUIRegisterMsg(). Then why not register more and do more. Took me about a month to discover how to put it together. Then I'm like "this would make a good example". So try it out, use what you need ( or as is ). Hopefully it'll save you the learning curve. The code is in the downloads section. ( I'm a copy and paste kind of coder, so racking my brain is not my forte. But at times, is what it takes to get working code ) PS: if you find a better way to do something or a gross misinterpretation in the code, do share. ( so I can copy and paste )
    1 point
  16. You're welcome! 😎 P.S. Please post any future support questions to the support thread
    1 point
  17. @Subz @seadoggie01 is absolutely right The analysis is correct. "Assign(iReplace, Eval(iReplace) + 1)" does the $iReplace incrementation (returns 1) so the variable can be used in the StringFormat (and the regex) using "Eval(iReplace)" which returns the value ... and yes, the challenge (for fun) was to build a one-liner - not totally achieved since the "$iReplace = 0 " declaration is needed first I formerly discovered this concept in a script from @jguinch (credits to you my friend !) I was in a hurry, this one is cleaner - more readable Local $iReplace = 0 $sOutput = Execute ("'" & StringRegExpReplace($txt, "(00000000)("")", _ "' & 'Bip_$1_'" & _ " & StringFormat('%02i', Assign('iReplace', Eval('iReplace')+1) * Eval('iReplace'))" & _ " & '$2 ' & '") & "'")
    1 point
  18. I just finished adding support for all of the leftover types of tokens, and now I have a fully functional tokenizer! The latest code is available on GitHub, and I have also uploaded the latest binary builds here so that you guys can test and give me feedback: There are two files, one each for Windows and Linux, and you guys are smart enough to figure out which is for which Right now the interface is very simple, just download the binary and supply it an .au3 file as the first command-line argument, and it will print out all the tokens. Please report any unknown token errors which occur in valid scripts! Have fun, TheDcoder.
    1 point
  19. Basically, Assign(iReplace, Eval(iReplace) + 1) is the same thing as $iReplace += 1. Assign returns 1 (Success) which, when multiplied, doesn't affect the final value returned by the last Eval(iReplace). Mikell could've just as easily moved Assign("iReplace", Eval("iReplace") + 1) to the following line to make this more readable, but I think he was going for a single line solution
    1 point
×
×
  • Create New...