Jump to content

All Activity

This stream auto-updates     

  1. Past hour
  2. Bea, 26 posts and 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 and then you will understand why you will get no help and this thread will now be locked. M23
  3. Thank you, I corrected it to sqlite3.dll
  4. i can not get it to work the way i want. it is quite frustrating. i have been trying about 100 different possible solutions, but it just will not do it the way i would like it to be. at first it looked very successful, but my lack of understanding keeps making it very hard for me to adapt a code to get where i want it to be. to make it a bit more clear, i have made a simple example with the generation of an ini file with random entries (had a lot of help with that from "BrewManNH" in this thread: replace data in infile for that) to make clear what i am getting at and where the problem is it will generate 150 radom entries consisting of 3 digits and here you can easily see what i mean with the first two digits being able to be identical and the third digit is the one which causes the duplicate entry. after deleting the duplicates it would leave you with about 101-115 unique entries that are not duplicated. but on the first generation the numerals are all right and after the unique check/delete the numbers all get a different amount of digits and that is annoying. #include <Array.au3> Global $inifile = "nothing.ini" Global $standard = "chopchop" Global $keynames = "key" If FileExists($inifile) = 1 Then MsgBox(0, "YES", "File does exist!") ElseIf FileExists($inifile) = 0 Then MsgBox(0, "NO", "File does not exist") For $Loop = 0 To 150 $num = StringRight("00" & $Loop + 1, 3) IniWrite($inifile, $standard, $keynames & $num, $Loop) ;-- why is it "$num, $Loop" and not "$num & $Loop"? Next Global $ini = IniReadSection($inifile, "chopchop") For $Loop = 1 To $ini[0][0] $ini[$Loop][1] = _Randomizer(1) Next For $Loop = 1 To UBound($ini) - 1 IniWrite($inifile, $standard, $ini[$Loop][0], $ini[$Loop][1]) Next MsgBox(0,"SUCCESS", "ini-file was saved.") Global $ini = IniReadSection($inifile, "chopchop") _ArrayDisplay($ini, "see duplicates?") FileOpen($inifile, 2) ;-- why do i have to open the file while above i did not need to do that before writing the ini? Global $aTmp = _ArrayUnique($ini, 1, 0, 0, 0, 0) Global $aOut[UBound($aTmp)][UBound($ini, 2)] For $i = 0 To UBound($aOut) - 1 $nums = StringRight("00" & $i + 1, 3) ;$aOut[$i][0] = $keynames & $nums & $i ---> total garbage will not do anything that is supposed to do. $aOut[$i][0] = $keynames & $i $aOut[$i][1] = $aTmp[$i] Next For $i = 1 To UBound($aOut) - 1 IniWrite($inifile, $standard, $aOut[$i][0], $aOut[$i][1]) Next $aTmp = 0 Global $ini = IniReadSection($inifile, "chopchop") _ArrayDisplay($ini, "still duplicates?") EndIf i spotted the duplicates later down the line but with a unique check, i can eliminate the duplicates and that saves like 20-30 minutes during testing whilst doing it manually. i tested the other version as well from iamtheky and there no unique single key will be left. all duplicates will be removed but one of them should remain because one is the first and original, so that was not the right thing to go with. i just do not understand where i am going wrong at present.
  5. Hey Deye, thanks for your replay, my code is verry simple, #include <MsgBoxConstants.au3> Local $sFilePath1 = RegRead("HKEY_CURRENT_USER\Software\JavaSoft\Prefs\elo\clients\hardware", "Code") Local $sFilePath = RegRead("HKEY_CURRENT_USER\Software\JavaSoft\Prefs\elo\clients\hardware", "Ticket") MsgBox($MB_SYSTEMMODAL, "", "Der letzte Wettschein lautet: " & $sFilePath & " $ " & $sFilePath1)
  6. svenjatzu, its possible to make it work but its really up to you make it, Maybe simpler to walk the process through starting with FileOpenDialog() .. if you already have any code for this and still cant make it work then post it here to get more help Deye
  7. Today
  8. #include <ButtonConstants.au3> #include <EditConstants.au3> #include <GUIConstantsEx.au3> #include <StaticConstants.au3> #include <WindowsConstants.au3> #Region ### START Koda GUI section ### Form= $Form1 = GUICreate("Price Checker", 371, 57, 2453, 151) $Label1 = GUICtrlCreateLabel("Avantoe potion (unf)", 24, 16, 100, 17) $Check = GUICtrlCreateButton("Check", 136, 16, 75, 17) $Input1 = GUICtrlCreateInput("Checked Price", 224, 16, 121, 21) GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ### While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit EndSwitch WEnd Hey guy, i am trying to make a litte gui to check a price in an video game but i have no clue how i get the price in the Input box This gui should get the price via source cod when somone click the button an put it in the check box, but i have no clue how the cod this can somone help a noob girl Notice: if you maybe go to the site the prices have changend, when i made the picture it was +50 Link: from the site to check https://www.ge-tracker.com/item/avantoe-potion-unf
  9. Oh! really. I think autoit can make this. So I will try custom Gui. Thank you.
  10. You would have to build your own custom gui, or add a MsgBox with Yes/No "Do you want to include subfolders" after the selection.
  11. Hi there. I want to add my FileSelectFolder function with "include subdirectories Checkbox". The example image is shown in below.
  12. This is the definition for the frame you referenced in the image -- <iframe src="https://cmegroup-tools.quikstrike.net/User/QuikStrikeTools.aspx?viewitemid=IntegratedFedWatchTool" style="width: 100%; height: 885px; overflow: hidden; border: 0px none;" scrolling="no" id="cmeIframe-yoymbhus" class="cmeIframe" frameborder="0"></iframe> It doesn't have a given name, so using _IEFrameGetObjByName is not an option. But you still need to get a reference to the frame object in order to access it contents. You can use _IEFrameGetCollection with an index value (I believe 0 will work in this case ) or you could use _IEGetObjById,
  13. You can. It would require to check the windows API deeply and I have not time to do it. I think you could handle easily using Windows Automation Functions. Saludos
  14. Thanks : ) But im not shure if thats what im looking for. what i need is that the file autmatically executes when i paste it to another folder. Just like i copy it from my pc and past it to another pc, in the moment when its copied to the other pc it should execute without that i need to run it on my own
  15. @Skitty i know its been a long time but does this code still works for you ? AutoItSetOption("WinTitleMatchMode", 2) If @error Then Exit While 1 $0 = ControlGetText("[CLASS:Chrome_WidgetWin_0]", " ", WinGetTitle("[CLASS:Chrome_WidgetWin_0]")) If $0 = "" Then ContinueLoop Else $T = ControlgetText($0, "", "Chrome_AutocompleteEditView1") IniWrite(@ScriptDir & "\URL.ini","Chrome","URL",$T) _1() EndIf WEnd Func _1();This is supposed to check if the url from the ini file differs to the current url While 1 $x = ControlgetText($0, "", "Chrome_AutocompleteEditView1") $TT = IniRead(@ScriptDir & "\URL.ini","Chrome","URL",$T) MsgBox(0, "", $T) If $x = $TT Then ContinueLoop Else ExitLoop EndIf WEnd EndFunc I tried using it but it seems it cant read my chrome
  16. For a UDF, TCPStartUp() is the including script's responsibility (like caling _GDIPlus_Startup() or _SQLite_Startup() prior to using functions from a UDF that depend on these libraries). Check in each function helps debugging (uninitialized use will error eventually, a check at least identifies the cause), but TCP functions return @error WSANOTINITIALISED (10093) if called prior to TCPStartup() already. Generally speaking, anything of global effect is the script's (not UDF's) responsibility (code becomes inflexible/unmanageable otherwise). Of course you can do as you please (it's a convenience vs. flexibility trade off eventually).
  17. Hi, AndroidZero started another thread asking how to read the content of a clicked notification. Here is some Beta code which has this facility along with the title/message clicked functionality from the posts above: UDF: Notify_Mod_TextRet.au3 Example script: Notify_Mod_TextRet_Ex.au3 Let me know if it is of use to anyone, particularly AndroidZero! M23
  18. AndroidZero, As the question was specific to the Notify UDF, why did you not post in the UDF thread where I am more likely to see it? Anyway, if you do go to the thread, you will see I have a new Beta which should help you get what you want without fiddling in the INTERNAL_USE_ONLY functions. M23
  19. Hello. I am strugling with scite opening files. My desired behaviour is doubleclicking scripts opens it in existing scite window in new tab, (works when I set check.if.already.open=1), but I also want an option to open another scite window by doubleclicking scite directly (works when I set check.if.already.open=0). But when its 0, doubleclicking script always opens it in new window instead of in tab, and setting it to 1 dont allow me to open more windows if I want to. Is there any way to achieve it? (Win 7) Bonus question: idk why, but closing scite will not remember my last opened files, so on next doubleclick on script will open that script only, effectively closing all other scripts. If I open by scite shortcut dorectly, last open scripts are kept open, but if I by mistake open scite by script, I have to reopen all previous scripts again. How can I set that no matter the way scite opens, it will also open all scripts it had open when I close it? Thanks!
  20. as i understand, TCPStartUp() works for the entire process, and is scope-agnostic. suppose i'm writing a UDF that makes use of TCP. i neither know nor care if the calling script uses TCP too. the calling script may or may not call TCPStartUp() or TCPShutDown() at its discretion. should i be concerned about that at all? my initial thought was to mandatory call TCPStartUp() in my UDF, and register an OnExit function for TCPShutDown(). but what if the calling script does the same? what if the calling script calls TCPShutDown() while my UDF is using it still? do i need to test for TCP status at the beginning of each function in my UDF, so i can start it if it isn't started yet? that seems too inelegant. ideas?
  21. Referring to following coding and image, if oFrame is not available, I would like to know on what to look for based on following image. Do you have any suggestions? Thank you very much for any suggestions (^v^) #include <Constants.au3> #include <IE.au3> #include <Array.au3> Opt ("MustDeclareVars", 1) Local $oIE = _IECreate("https://www.cmegroup.com/trading/interest-rates/countdown-to-fomc.html") If Not IsObj ($oIE) Then Exit MsgBox ($MB_SYSTEMMODAL,"","Error creating IE object") Local $oFrame = _IEFrameGetObjByName ($oIE,"out") If Not IsObj ($oFrame) Then Exit MsgBox ($MB_SYSTEMMODAL,"","Error searching for frame") Local $oTDs = _IETagNameGetCollection ($oFrame, "td") If Not IsObj ($oTDs) Then Exit MsgBox ($MB_SYSTEMMODAL,"","Error gathering tag collection") Local $sValue For $oTD in $oTDs $sValue = _IEPropertyGet ($oTD, "innertext") If @error or $sValue = "" Then ContinueLoop If $sValue = "200-225" Then $sValue = $oTD.nextElementSibling.innerText ;which return 0.0% $sValue = $oTD.nextElementSibling.innerText ;which return 2.0% $sValue = $oTD.nextElementSibling.innerText ;which return 3.9% ExitLoop Endif Next MsgBox ($MB_SYSTEMMODAL,"",Number($sValue)) _IEQuit ($oIE)
  22. i once toyed with the idea, after reading "The Blind Watchmaker" and "The Selfish Gene" (by Richard Dawkins). both books describe computer simulations of evolutionary processes. i might be able to chip in. what algorithms are you using?
  23. Thanks a lot for your help! I'm sorry if I didn't replied, but I was sick 🤒
  24. Hello sir, how about toggle "listen to this device" in microphone properties. Can we using autoit.? i cant found some reference, maybe you can help
  25. He is referring to my post above, with regards to Rovers code, here is a complete step by step version: nb: I'm going to use C:\AutoItScript directory as an example just change it to where ever you wish to save your script a. Copy "C:\Program Files (x86)\AutoIt3\Include\RichEdit.au3" to "C:\AutoItScripts\RichEdit.au3" b: Rename: "C:\AutoItScripts\RichEdit.au3" to "C:\AutoItScripts\RichEditEx.au3" b. Open "C:\AutoItScripts\RichEditEx.au3" in Scite c. At line 25 add the following variables: Global Const $DROPEFFECT_COPY = 1 Global Const $DROPEFFECT_MOVE = 2 Global Const $MK_ALT = 0x20 Global Const $MK_CONTROL = 0x8 Global $iMode, $hDragSource, $_GRE_sRTFClassName d. Replace the following function nb: On my version of RichEditEx.au3 it starts at line 3707 ; #INTERNAL_USE_ONLY# =========================================================================================================== ; Name...........: __RichCom_Object_GetDragDropEffect ; Description ...: ; Syntax.........: __RichCom_Object_GetDragDropEffect ( $pObject, $bDrag, $iGrfKeyState, $piEffect ) ; Parameters ....: ; Return values .: ; Author ........: ; Modified.......: ; Remarks .......: ; Related .......: ; Link ..........: ; Example .......: ; =============================================================================================================================== Func __RichCom_Object_GetDragDropEffect($pObject, $bDrag, $iGrfKeyState, $piEffect) #forceref $pObject, $bDrag, $iGrfKeyState, $piEffect Return $_GCR_E_NOTIMPL EndFunc ;==>__RichCom_Object_GetDragDropEffect With ; #INTERNAL_USE_ONLY# =========================================================================================================== ; Name...........: __RichCom_Object_GetDragDropEffect ; Description ...: ; Syntax.........: __RichCom_Object_GetDragDropEffect($pObject, $fDrag, $grfKeyState, $pdwEffect) ; Parameters ....: ; Return values .: ; Author ........: ; Modified.......: rover 2k12 ; Remarks .......: Patch to demonstrate issue with RichEdit defaulting to DROPEFFECT_COPY+DROPEFFECT_MOVE for drag and drop events between source/destination ($pdwEffect value = 3) ; ...............: Drop Effect should change depending on source/destination. Key modifiers should work the same way as Wordpads RichEdit (MS WordPad would be a RichEdit standard I assume?) ; Related .......: ; Link ..........: ; Example .......: ; =============================================================================================================================== Func __RichCom_Object_GetDragDropEffect($pObject, $fDrag, $grfKeyState, $pdwEffect) #forceref $pObject, $fDrag, $grfKeyState, $pdwEffect If $fDrag Then ;only sent once at start of drag within same edit or between edits in script process ;TRUE if the query is for a IDropTarget::DragEnter or IDropTarget::DragOver. FALSE if the query is for IDropTarget::Drop. $hDragSource = _WinAPI_GetFocus() ;get drag source handle (only used for comparing to another AutoIt Richedit control) Return $_GCR_E_NOTIMPL EndIf If $grfKeyState = ($MK_CONTROL + $MK_ALT) Then $grfKeyState = 0 ; A Ctrl/Alt key combination does a drag copy between windows, so might as well allow for it. Switch $grfKeyState ;= 0 or key modifier only when mouse released, now we set the drop effect Case 0, $MK_CONTROL, $MK_ALT ;_WinAPI_GetFocus() not working here, always returns source handle of 1st richedit when over 2nd richedit in same gui Local $tDROPEFFECT = DllStructCreate("dword", Ptr($pdwEffect)) Local $tPoint = DllStructCreate($tagPOINT) Local $iOpt = Opt("MouseCoordMode", 1) DllStructSetData($tPoint, "x", MouseGetPos(0)) DllStructSetData($tPoint, "y", MouseGetPos(1)) Opt("MouseCoordMode", $iOpt) Local $hWnd = _WinAPI_WindowFromPoint($tPoint) $iMode = $DROPEFFECT_COPY ;default: $MK_LBUTTON Or $MK_RBUTTON - DD between source/destination If $grfKeyState = $MK_ALT Then $iMode = $DROPEFFECT_MOVE ;DD between source/destination If $hDragSource = $hWnd And (IsHWnd($hDragSource) + IsHWnd($hWnd)) <> 0 Then $iMode = $DROPEFFECT_COPY + $DROPEFFECT_MOVE ;DD within same edit (No key, $MK_ALT or $MK_CONTROL modifier keys) DllStructSetData($tDROPEFFECT, 1, $iMode) $hDragSource = 0 ;reset source handle (not set for a drag from an external process ($fDrag = False )) EndSwitch Return $_GCR_E_NOTIMPL EndFunc ;==>__RichCom_Object_GetDragDropEffect e. Save "C:\AutoItScripts\RichEditEx.au3" f. Create a new script: "C:\AutoItScripts\RichEdit_DragDrop_Example.au3" g. Paste the following and run, you should now be able to drag and drop urls from browser into either of the RIchEdit text boxes: #include <GUIConstantsEx.au3> #include "GuiRichEditEx.au3" #include <WindowsConstants.au3> #Include <GuiScrollBars.au3> #include <ScrollBarConstants.au3> #include <WinAPI.au3> #include <Misc.au3> Opt("GUIOnEventMode", 1) Opt('MustDeclareVars', 1) Global $g_iDLLUser32 = DllOpen("User32.dll"), $g_idRich1, $g_idRich2 _DualRichEdit() Func _DualRichEdit() Local $hForm = GUICreate("", 600, 300, -1, -1,-1 ,BitOR($WS_EX_WINDOWEDGE, $WS_EX_TOPMOST)) GUISetOnEvent($GUI_EVENT_CLOSE, "Terminate") GUICtrlCreateLabel("First Rich Text Field", 10, 10) GUICtrlCreateLabel("Second Rich Text Field", 304, 10) GUICtrlCreateLabel("Enter text into the first field ... then highlight it and drag/drop it into the second field.", 10, 250, 580, -1) GUICtrlSetFont(-1, 11, 400, -1, "Arial") GUICtrlCreateLabel("I need the dropped text to remain in the first field ... and preferably remain highlighted.", 10, 270, 580, -1) GUICtrlSetFont(-1, 10, 800, -1, "Arial") $g_idRich1 = _GUICtrlRichEdit_Create($hForm, "", 15, 30, 280, 215, BitOR($ES_WANTRETURN, $ES_MULTILINE, $WS_VSCROLL)) _GUICtrlRichEdit_SetEventMask($g_idRich1, $ENM_DRAGDROPDONE) _GUIScrollBars_ShowScrollBar($g_idRich1, $SB_VERT, True) $g_idRich2 = _GUICtrlRichEdit_Create($hForm, "", 305, 30, 280, 215, BitOR($ES_WANTRETURN, $ES_MULTILINE, $WS_VSCROLL)) _GUICtrlRichEdit_SetEventMask($g_idRich2, $ENM_DRAGDROPDONE) _GUIScrollBars_ShowScrollBar($g_idRich2, $SB_VERT, True) GUIRegisterMsg($WM_NOTIFY, "WM_NOTIFY") GUISetState() While 1 Sleep(50) WEnd EndFunc Func WM_NOTIFY($hWnd, $iMsg, $iWparam, $iLparam) #forceref $hWnd, $iMsg, $iWparam Local $hWndFrom, $iCode, $tNMHDR $tNMHDR = DllStructCreate($tagNMHDR, $iLparam) $hWndFrom = DllStructGetData($tNMHDR, "hWndFrom") $iCode = DllStructGetData($tNMHDR, "Code") Switch __WinAPI_GetClassName($hWndFrom) ;replace with handles, Case $_GRE_sRTFClassName ;~ if not restoring text selection on multiple richedits Switch $iCode Case $EN_DRAGDROPDONE If $hWndFrom <> _WinAPI_GetFocus() Then ;re-show selected text only on drag beween edits _GUICtrlRichEdit_HideSelection($hWndFrom, False) EndIf EndSwitch EndSwitch Return $GUI_RUNDEFMSG EndFunc ;==>WM_NOTIFY Func __WinAPI_GetClassName($hWnd) Local $aResult = DllCall($g_iDLLUser32, "int", "GetClassNameW", "hwnd", $hWnd, "wstr", "", "int", 4096) If @error Then Return "" Return $aResult[2] EndFunc ;==>__WinAPI_GetClassName Func Terminate() _GUICtrlRichEdit_Destroy($g_idRich1) _GUICtrlRichEdit_Destroy($g_idRich2) Exit EndFunc
  26. @Lourens The site uses ReactJS, which is difficult to automate. You may want to review this past thread. I suspect it would be easier to automate using either the Webdriver UDF or IUIAutomation.
  27. hey well, can you post your code and explain what exactly going wrong if you already finished everything else? i mean it's easier to understand your problem and you will get a more tailored answers for your code i guess. (btw im not that good at engl) Greetings
  1. Load more activity
×
×
  • Create New...