Jump to content

HezzelQuartz

Active Members
  • Posts

    96
  • Joined

  • Last visited

Everything posted by HezzelQuartz

  1. change those 3 values ( in the SciTEUSer.Properties file ) to match your desire value, to the same value, and it behaves as it should. "use.tabs=1" because, that's for the tabs ?, unless you would like spaces ?, but running tidy will turn it into tabs. What @Jos said: "Just a wild guess" is right on the money. ...thinking on my feet here, ...I've never changed the defaults on SciTE and I don't see a situation where someone would do different than me but, some people do @HezzelQuartz, Tabs is what I use and to make tabs look 3 or 4 spaces long, those 3 values work fine if, using tabs. If the desire is to use spaces, then you'll run into tidy not doing that, because it uses tabs. That is my experience with v4.4.6 PS: I figure that all you care about is the line not matching the indentation and that is corrected as described above. PS2: and the user options file can be easily open by clicking the SciTE menu: Ah, yes I tried and I understand the difference now when I changed Indent size and tab size
  2. I first download and install AutoIt3 installer then I download and install SciTE4Autoit3 installer This is the source
  3. I try Ctrl-Shift-i, It showed "tab size 4", "indent size 4", "Use tabs checked". I think it is by default, but still as I said first when I press enter, the position will not be on the indent line Should I try something else? Thank You
  4. First I install autoit v3.3.16.1 [I download from web] Second I install Autoit editor 4.4.6 [I download from web] But sorry What do you mean "How did you install SciTE"?
  5. Actually, I don't know where is the SciTEUser.properties but, I try to look for it and I think I found it inside "C:\Program Files (x86)\AutoIt3\SciTE" like this below: import au3.UserUdfs import au3.keywords.user.abbreviations I try to copy the standard tabsize 4, indent.size 4, and use.tabs 1, but still not working ------------------------------------------------------------------------------------------------------------------------------- I try to open it from "Options => Open User Options File", then it showed address "C:\Users\LegionPro5\AppData\Local\AutoIt v3\SciTE" so, I also try to find in "C:\Users\LegionPro5\AppData\Local\AutoIt v3\SciTE" but It's not found. Then, I try to change directly from Options => Open User Options File but also still not working For information, when I open user options file, it is empty, nothing inside ------------------------------------------------------------------------------------------------------------------------------- Did I do something wrong? Thank You
  6. After I type "If .... then", then I press enter, the position will be two space after indent line How to set scite position to be exactly on the indent line Thank You
  7. How to change Scite Background Color? I try to open and modify Global Option File but "Could not save to SciTEGlobal.properties" Thank You
  8. I try to run _GUICtrlComboBox_AutoComplete example, but error opening the file <Extras\WM_NOTIFY.au3> It seems that there is no WM_NOTIFY.au3 file exist in my Extras folder How can I get WM_NOTIFY.au3? What mistake I do? Thank You
  9. I try to learn from predicttext.udf example. when I try use GuiCtrlCreateEdit like shown below, it works #include-once #include <GUIConstants.au3> #include 'PredictText.au3' $hGUI = GUICreate('Predict Text + GUI Learn', 220, 60) $Input_Payment_Method = GUICtrlCreateEdit("",10, 10, 200, 50) ;GUICtrlSetData($Input_Payment_Method, "Wood|Metal|Plastic", "") GUIRegisterMsg($WM_COMMAND, 'WM_COMMAND') GUISetState() Local $iGUIGetMsg While 1 $iGUIGetMsg = GUIGetMsg() Switch $iGUIGetMsg Case $GUI_EVENT_CLOSE ExitLoop EndSwitch WEnd Func WM_COMMAND($hWnd, $iMsg, $wParam, $lParam) If _WinAPI_HiWord($wParam) = $EN_SETFOCUS Then Local $_Words1[3] = ['Wood', 'Metal', 'Plastic'] Switch $lParam Case GUICtrlGetHandle($Input_Payment_Method) _RegisterPrediction($lParam, $_Words1) EndSwitch EndIf Return $GUI_RUNDEFMSG EndFunc But, if I change it to GuiCtrlCreateCombo like shown below, it doesn't work #include-once #include <GUIConstants.au3> #include 'PredictText.au3' $hGUI = GUICreate('Predict Text + GUI Learn', 220, 60) $Input_Payment_Method = GUICtrlCreateCombo("",10, 10, 200, 50) GUICtrlSetData($Input_Payment_Method, "Wood|Metal|Plastic", "") GUIRegisterMsg($WM_COMMAND, 'WM_COMMAND') GUISetState() Local $iGUIGetMsg While 1 $iGUIGetMsg = GUIGetMsg() Switch $iGUIGetMsg Case $GUI_EVENT_CLOSE ExitLoop EndSwitch WEnd Func WM_COMMAND($hWnd, $iMsg, $wParam, $lParam) If _WinAPI_HiWord($wParam) = $EN_SETFOCUS Then Local $_Words1[3] = ['Wood', 'Metal', 'Plastic'] Switch $lParam Case GUICtrlGetHandle($Input_Payment_Method) _RegisterPrediction($lParam, $_Words1) EndSwitch EndIf Return $GUI_RUNDEFMSG EndFunc How to make it works? Thank You
  10. @SOLVE-SMART This is what I have tried using relative xpath #include "wd_core.au3" #include "wd_helper.au3" Local $sDesiredCapabilities, $sSession SetupGecko() _WD_Startup() $sSession = _WD_CreateSession($sDesiredCapabilities) _WD_Navigate($sSession, "https://www.??????.???/") Func SetupGecko() _WD_Option('Driver', 'geckodriver.exe') _WD_Option('Port', 4444) _WD_Option('DriverParams', '--log trace') $sDesiredCapabilities = '{"capabilities": {"alwaysMatch": {"browserName": "firefox", "acceptInsecureCerts":true}}}' EndFunc Sleep(5000) $sElement = _WD_FindElement($sSession, $_WD_LOCATOR_ByXPath, "//button[@class='close']") If @error = $_WD_ERROR_Success Then _WD_ElementActionEx($sSession, $sElement, "click") Sleep(2000) EndIf ; $sElement = _WD_FindElement($sSession, $_WD_LOCATOR_ByXPath, "//a[@class='btn btn-grad-orange']") If @error = $_WD_ERROR_Success Then _WD_ElementActionEx($sSession, $sElement, "click") Sleep(2000) EndIf ; $sElement = _WD_FindElement($sSession, $_WD_LOCATOR_ByXPath, "//input[@name='usn']") If @error = $_WD_ERROR_Success Then _WD_ElementAction($sSession, $sElement, 'value', "xxxxxx") Sleep(1000) EndIf ; $sElement = _WD_FindElement($sSession, $_WD_LOCATOR_ByXPath, "//input[@name='pwd']") If @error = $_WD_ERROR_Success Then _WD_ElementAction($sSession, $sElement, 'value', "yyyyyy") Sleep(1000) EndIf ; $sElement = _WD_FindElement($sSession, $_WD_LOCATOR_ByXPath, "//input[@class='btn btn-purple btn-block btn-xyz-submit']") If @error = $_WD_ERROR_Success Then _WD_ElementActionEx($sSession, $sElement, "click") Sleep(2000) EndIf ; $sElement = _WD_FindElement($sSession, $_WD_LOCATOR_ByXPath, "//button[@class='close']") If @error = $_WD_ERROR_Success Then _WD_ElementActionEx($sSession, $sElement, "click") Sleep(2000) EndIf ; $sElement = _WD_FindElement($sSession, $_WD_LOCATOR_ByXPath, "//a[@class='btn btn-grad-orange dropdown-toggle']") If @error = $_WD_ERROR_Success Then _WD_ElementActionEx($sSession, $sElement, "click") Sleep(2000) EndIf ; $sElement = _WD_FindElement($sSession, $_WD_LOCATOR_ByXPath, "//a[@href='/wallet/history/']") If @error = $_WD_ERROR_Success Then _WD_ElementActionEx($sSession, $sElement, "click") Sleep(2000) EndIf ; $sElement = _WD_FindElement($sSession, $_WD_LOCATOR_ByXPath, "//img[@src='/assets/images/wallet/history/purchase.png']") If @error = $_WD_ERROR_Success Then _WD_ElementActionEx($sSession, $sElement, "click") Sleep(5000) EndIf ; $sElement = _WD_FindElement($sSession, $_WD_LOCATOR_ByXPath, "//strong/..", Default, True) for $i = 0 To UBound($sElement) - 1 $sText = _WD_ElementAction($sSession, $sElement[$i], 'text') FileWrite ( "Text.txt", $sText & @CRLF) Next The Result will be a lot of course, and not specific because the html structure is more complex, so I need to specify the array to get the result I want like below: _WD_ElementAction($sSession, $sElement[1], 'text') I tried also using absolute xpath like below: #include "wd_core.au3" #include "wd_helper.au3" Local $sDesiredCapabilities, $sSession SetupGecko() _WD_Startup() $sSession = _WD_CreateSession($sDesiredCapabilities) _WD_Navigate($sSession, "https://www.??????.???/") Func SetupGecko() _WD_Option('Driver', 'geckodriver.exe') _WD_Option('Port', 4444) _WD_Option('DriverParams', '--log trace') $sDesiredCapabilities = '{"capabilities": {"alwaysMatch": {"browserName": "firefox", "acceptInsecureCerts":true}}}' EndFunc Sleep(5000) $sElement = _WD_FindElement($sSession, $_WD_LOCATOR_ByXPath, "//button[@class='close']") If @error = $_WD_ERROR_Success Then _WD_ElementActionEx($sSession, $sElement, "click") Sleep(2000) EndIf ; $sElement = _WD_FindElement($sSession, $_WD_LOCATOR_ByXPath, "//a[@class='btn btn-grad-orange']") If @error = $_WD_ERROR_Success Then _WD_ElementActionEx($sSession, $sElement, "click") Sleep(2000) EndIf ; $sElement = _WD_FindElement($sSession, $_WD_LOCATOR_ByXPath, "//input[@name='usn']") If @error = $_WD_ERROR_Success Then _WD_ElementAction($sSession, $sElement, 'value', "xxxxxx") Sleep(1000) EndIf ; $sElement = _WD_FindElement($sSession, $_WD_LOCATOR_ByXPath, "//input[@name='pwd']") If @error = $_WD_ERROR_Success Then _WD_ElementAction($sSession, $sElement, 'value', "yyyyyy") Sleep(1000) EndIf ; $sElement = _WD_FindElement($sSession, $_WD_LOCATOR_ByXPath, "//input[@class='btn btn-purple btn-block btn-xyz-submit']") If @error = $_WD_ERROR_Success Then _WD_ElementActionEx($sSession, $sElement, "click") Sleep(2000) EndIf ; $sElement = _WD_FindElement($sSession, $_WD_LOCATOR_ByXPath, "//button[@class='close']") If @error = $_WD_ERROR_Success Then _WD_ElementActionEx($sSession, $sElement, "click") Sleep(2000) EndIf ; $sElement = _WD_FindElement($sSession, $_WD_LOCATOR_ByXPath, "//a[@class='btn btn-grad-orange dropdown-toggle']") If @error = $_WD_ERROR_Success Then _WD_ElementActionEx($sSession, $sElement, "click") Sleep(2000) EndIf ; $sElement = _WD_FindElement($sSession, $_WD_LOCATOR_ByXPath, "//a[@href='/wallet/history/']") If @error = $_WD_ERROR_Success Then _WD_ElementActionEx($sSession, $sElement, "click") Sleep(2000) EndIf ; $sElement = _WD_FindElement($sSession, $_WD_LOCATOR_ByXPath, "//img[@src='/assets/images/wallet/history/purchase.png']") If @error = $_WD_ERROR_Success Then _WD_ElementActionEx($sSession, $sElement, "click") Sleep(5000) EndIf ; $sElement = _WD_FindElement($sSession, $_WD_LOCATOR_ByXPath, "/html/body/div[3]/div/div/div[2]/div/div[2]/table/tbody/tr[1]/td[3]/ul/li[3]/strong/..") $sText = _WD_ElementAction($sSession, $sElement, 'text') FileWrite ( "Text.txt", $sText & @CRLF) Of course, I got the result I wanted The point is, If I use relative xpath, the result will be a lot, so I need to specify the array or use conditional to detect what I want If I use absolute xpath, the result will be very specific, only one result What I want is, using relative xpath, but still get very specific result, only one, maybe with "AND"?. Thank You
  11. @Nine Is it counted as spoon-feeding solution? If you ask me, what I have attempted to solve this issue, i stuck, no clue for this. How can you easily accuse me that I only want spoon-feeding solution? There is also another post/thread I create below he gives me example to look and learn from his github about how to deal with my problem. Is it also counted as spoon-feeding solution? I'm really sorry because I don't know that it is I only hope that if someone doesn't want to give the answer, at least give some clue so that I can learn by myself. No offense at all Thank You
  12. @SOLVE-SMART Sorry, I have another question What if it is more complicated like my example below? <body id="body-overlay"> <div class="xyz-content"> <div class="container"> <div class="xyz-wrapcontent"> <div id="history" class="xyz-history-container"> <div class="xyz-history-content"> <p> Last Login: <strong>06/03/2025 5:31:40</strong> </p> <div id="tbl" class="xyz-history-table-content"> <table class="table table-hover table-sm table-striped" style="width:100%"> <tbody> <tr> <td> <ul> <li> ::marker <strong>Transaction ID:</strong> 4537988 </li> </ul> </td> </tr> <tr> <td> <ul> <li> ::marker <strong>Transaction ID:</strong> 4537107 </li> </ul> </td> </tr> <tr> <td> <ul> <li> ::marker <strong>Transaction ID:</strong> 4537092 </li> </ul> </td> </tr> </tbody> </div> </div> </div> </div> </div> </div> </div> </body> There is another strong above, but I want to get only text between strong inside <table class="table table-hover table-sm table-striped" style="width:100%"> How can I get only transaction ID without detecting "06/03/2025 5:31:40"? Is there any way I can use xpath pattern like "//strong" and something else so that it only search inside <table class="table table-hover table-sm table-striped" style="width:100%">? Thank You
  13. @SOLVE-SMART Sorry, is that newer webdriver udf? Should I change udf? I actually confused could you give me simple example or clue how to use that udf? Thank You
  14. How to know the handle of first create tab in webdriver? If my code is below: #include "wd_core.au3" #include "wd_helper.au3" Local $sDesiredCapabilities, $sSession SetupGecko() _WD_Startup() $sSession = _WD_CreateSession($sDesiredCapabilities) ;========================================================================= $sTab1 = _WD_NewTab($sSession) _WD_Navigate($sSession, "https://www.xzy.xzy/") $sTab2 = _WD_NewTab($sSession) _WD_Navigate($sSession, "https://www.abc.abc/") _WD_Window($sSession, 'Switch', '{"handle":"' & $sTab1 & '"}') ;========================================================================= Func SetupGecko() _WD_Option('Driver', 'geckodriver.exe') _WD_Option('Port', 4444) _WD_Option('DriverParams', '--log trace') $sDesiredCapabilities = '{"capabilities": {"alwaysMatch": {"browserName": "firefox", "acceptInsecureCerts":true}}}' EndFunc There will be 3 tab first tab is empty second tab is xyz third tab is abc it will first open firefox and create first tab which is empty then it will create second tab and navigate to xyz then it will create third tab and navigate to abc then it will attach back to second tab which is xyz my question is: i know the handle of the second and third tab from the handle returned when doing _WD_NewTab but how can I switch back to the first empty tab? Thank You ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; @SOLVE-SMART Sorry for creating new topic again
  15. @Danp2 Yes, of course This is what I tried so far #include "wd_core.au3" #include "wd_helper.au3" Local $sDesiredCapabilities, $sSession SetupGecko() _WD_Startup() $sSession = _WD_CreateSession($sDesiredCapabilities) _WD_Navigate($sSession, "https://www.??????.???/") Func SetupGecko() _WD_Option('Driver', 'geckodriver.exe') _WD_Option('Port', 4444) _WD_Option('DriverParams', '--log trace') $sDesiredCapabilities = '{"capabilities": {"alwaysMatch": {"browserName": "firefox", "acceptInsecureCerts":true}}}' EndFunc Sleep(5000) $sElement = _WD_FindElement($sSession, $_WD_LOCATOR_ByXPath, "//button[@class='close']") If @error = $_WD_ERROR_Success Then _WD_ElementActionEx($sSession, $sElement, "click") Sleep(2000) EndIf ; $sElement = _WD_FindElement($sSession, $_WD_LOCATOR_ByXPath, "//a[@class='btn btn-grad-orange']") If @error = $_WD_ERROR_Success Then _WD_ElementActionEx($sSession, $sElement, "click") Sleep(2000) EndIf ; $sElement = _WD_FindElement($sSession, $_WD_LOCATOR_ByXPath, "//input[@name='usn']") If @error = $_WD_ERROR_Success Then _WD_ElementAction($sSession, $sElement, 'value', "xxxxxx") Sleep(1000) EndIf ; $sElement = _WD_FindElement($sSession, $_WD_LOCATOR_ByXPath, "//input[@name='pwd']") If @error = $_WD_ERROR_Success Then _WD_ElementAction($sSession, $sElement, 'value', "yyyyyy") Sleep(1000) EndIf ; $sElement = _WD_FindElement($sSession, $_WD_LOCATOR_ByXPath, "//input[@class='btn btn-purple btn-block btn-xyz-submit']") If @error = $_WD_ERROR_Success Then _WD_ElementActionEx($sSession, $sElement, "click") Sleep(2000) EndIf ; $sElement = _WD_FindElement($sSession, $_WD_LOCATOR_ByXPath, "//button[@class='close']") If @error = $_WD_ERROR_Success Then _WD_ElementActionEx($sSession, $sElement, "click") Sleep(2000) EndIf ; $sElement = _WD_FindElement($sSession, $_WD_LOCATOR_ByXPath, "//a[@class='btn btn-grad-orange dropdown-toggle']") If @error = $_WD_ERROR_Success Then _WD_ElementActionEx($sSession, $sElement, "click") Sleep(2000) EndIf ; $sElement = _WD_FindElement($sSession, $_WD_LOCATOR_ByXPath, "//a[@href='/wallet/history/']") If @error = $_WD_ERROR_Success Then _WD_ElementActionEx($sSession, $sElement, "click") Sleep(2000) EndIf ; $sElement = _WD_FindElement($sSession, $_WD_LOCATOR_ByXPath, "//img[@src='/assets/images/wallet/history/purchase.png']") If @error = $_WD_ERROR_Success Then _WD_ElementActionEx($sSession, $sElement, "click") Sleep(2000) EndIf ; After doing above there is a table containing several transaction ID I want to take the first one or two or three I plan to do while loop inside
  16. @Danp2 Could you tell me how to do that? What $sStrategy and $sSelector should I use? How to show the table or the specific result I mean above? Thank You ================================================================================================ @Nessie Is there any way so that I don't need to store the website source into text file?
  17. If I have a website element below and I still don't know the transaction ID number <body id="body-overlay"> <div class="xyz-content"> <div class="container"> <div class="xyz-wrapcontent"> <div id="history" class="xyz-history-container"> <div class="xyz-history-content"> <div id="tbl" class="xyz-history-table-content"> <table class="table table-hover table-sm table-striped" style="width:100%"> <tbody> <tr> <td> <ul> <li> ::marker <strong>Transaction ID:</strong> 4537988 </li> </ul> </td> </tr> <tr> <td> <ul> <li> ::marker <strong>Transaction ID:</strong> 4537107 </li> </ul> </td> </tr> <tr> <td> <ul> <li> ::marker <strong>Transaction ID:</strong> 4537092 </li> </ul> </td> </tr> </tbody> </div> </div> </div> </div> </div> </div> </div> </body> How to use webdriver to find the transaction ID number? Thank you
  18. @SOLVE-SMART <body id="body-overlay"> <div class="xyz-content"> <div class="container"> <div class="xyz-wrapcontent"> <div id="history" class="xyz-history-container"> <div class="xyz-history-content"> <div id="tbl" class="xyz-history-table-content"> <table class="table table-hover table-sm table-striped" style="width:100%"> <tbody> <tr> <td> <ul> <li> ::marker <strong>Transaction ID:</strong> 4537988 </li> </ul> </td> </tr> <tr> <td> <ul> <li> ::marker <strong>Transaction ID:</strong> 4537107 </li> </ul> </td> </tr> <tr> <td> <ul> <li> ::marker <strong>Transaction ID:</strong> 4537092 </li> </ul> </td> </tr> </tbody> </div> </div> </div> </div> </div> </div> </div> </body> how about my example above? How to use Webdriver to get first, second, and third Transaction ID? I Want to get the text Or Maybe I Think I should create new thread
  19. How to define Webdriver $sSelector or $_WD_LOCATOR in this element below: <a class="btn btn-grad-orange" href="/wallet/login.asp">Login</a> Can i use $_WD_LOCATOR_ByXPath for this? Thank You
  20. @Nine @argumentum Sorry for noob question, What is the difference between fork.udf and pmt.udf?
  21. I just create tool to patch / modify hex file While 1 While $Standby = True ; Open the file for binary read and load content $hFile = FileOpen('D:\Projects\exampleori', 16) $bRead = FileRead($hFile) FileClose($hFile) ;Display a progress bar window. ProgressOn("Progress Meter", "Begin Convert / Revert Process", "0%", 1180, 1400, 16) ; Do your processing stuff ProgressSet(((33-33)*100/26889) & "%", "Starting Convert / Revert Process") $bRead = StringRegExpReplace($bRead, $suba64w0w0w0, $mova64w0c0) $bRead = StringRegExpReplace($bRead, $suba64w0w1w1, $mova64w0c0) $bRead = StringRegExpReplace($bRead, $suba64w0w2w2, $mova64w0c0) ... ... ... $bRead = StringRegExpReplace($bRead, $mova64x29x29, $nopa64) $bRead = StringRegExpReplace($bRead, $mova64x30x30, $nopa64) $bRead = StringRegExpReplace($bRead, $mova64x31x31, $nopa64) ProgressSet(100 & "%", "Done", "Complete") Sleep(500) ; Close the progress window. ProgressOff() ;Open the file for binary write and save content $hFile = FileOpen('D:\Projects\exampleoriconvert', 18) FileWrite($hFile, $bRead) FileClose($hFile) ; $Standby = False WEnd WEnd when I run it, It needs about 3 hours to be completed If I want to patch 4 files at the same time, I create 4 copy of my autoit file, then run it one by one How to execute my tools to patch 4 files at the same time using only 1 autoit file? I want the result to be like the picture below
×
×
  • Create New...