Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 01/27/2021 in all areas

  1. mLipok

    If "that" in "this"

    Try to do it in this way: _Example() Func _Example() Local $sSearchFor = InputBox("Please enter a word you want to search for", "") If StringInStr(FileRead('PATH TO YOUR FILE', $sSearchFor)) Then ; Do yours stuff EndIf EndFunc ;==>_Example
    2 points
  2. jchd

    Floating numbers issue

    A more low-level illustration of what's under the hood: $n = 0.01 is represented internally by the exact value +0.0099840000000000002078337502098293043673038482666015625 After performing this loop: Local $n = 2 For $i = 1 To 23 $n += 0.01 Next $n has the exact internal representation +2.2299999999999950972551232553087174892425537109375 while the value 2.23 is exactly represented internally as +2.229999999999999982236431605997495353221893310546875 which shows that equality can't be achieved. Each value shown above results from exactly computing and composing the components (sign, scale, mantissa) of the low-level FP representation.
    1 point
  3. Maybe try passing the "dir" command line parameter like in the original screenshot?
    1 point
  4. Ok argumentum, I'll let you know when this working patch is ready and fully tested. It will take some time as I got, starting tomorrow, some tax return to prepare. Bravo for your script in your last comment, which pulled the data and created the arrays, nicely done
    1 point
  5. yes, I pulled the data: from the web page and Arrayfy it the way Yashied did. Then added those entries Yashied have and the page don't have. Had to give'em a name so I used those from the webpage, tho, yes, renaming would make shorter code possible. You are much more proficient with all this GUI stuff than me. The modifications are simple to find and change. You know what you have in mind and are familiar with the challenges. I say you give me the code to include/patch and I'll post it. It'll be easier than back and forth ideas, and I trust your coding ideas. So its been decided, all in favor say yey ( yey ), motion passes for you to supply a working patch lol, me too
    1 point
  6. Nine

    Floating numbers issue

    And using case-sensitive strings operator is not going to help either
    1 point
  7. The benefit of maintaining the data in an external file (here the .txt) is, that you can make additions without having to constantly change the script itself. Here is an example which contains both variants (comment out the unwanted one) : #include <Array.au3> #include <File.au3> ; ====> Comment out variant 1 or 2 depending on your needs ; ----> Variant 1 : Read data from a file : -------------- ;~ Global $aHWIDList, $sFilePath, $bHWIDFound, $sHWIDInput ;~ $sFilePath = @ScriptDir & "\HWIDList.txt" ;~ $bHWIDFound = False ;~ _FileReadToArray($sFilePath, $aHWIDList, $FRTA_NOCOUNT, ";") ; ----- End of Variant 1 --------------------------------- ; ----> Variant 2 : array within the script : ------------ Global $bHWIDFound, $sHWIDInput Global $aHWIDList[4][2] = [["42421425", "mark"], _ ["85738578", "monte"], _ ["84885282", "heinz"], _ ["98573857", "tobiData"]] $bHWIDFound = False ; ----- End of Variant 2 --------------------------------- _ArrayDisplay($aHWIDList, "Test : Output") ; *** just for display during test For $i = 0 To UBound($aHWIDList) - 1 If _GetHWID() = $aHWIDList[$i][0] Then MsgBox(0, "HWID found", "HWID=" & $aHWIDList[$i][0] & " Name=" & $aHWIDList[$i][1] & @CRLF) $bHWIDFound = True ExitLoop EndIf Next If Not $bHWIDFound Then $sHWIDInput = InputBox("HWID_ERROR", "Contact Support!", _GetHWID(), "", 270, 150) If @error Then Exit Else ClipPut(_GetHWID()) Exit EndIf EndIf ; naked function for testing : Func _GetHWID() Local $sHWID = "" ; ... put the real GetHWID statements here $sHWID = "84885282" ; only for test Return $sHWID EndFunc
    1 point
    I have access to the Code::Blocks GCC compiler. In order to get this to work, I did the following: Create a local folder with all the includes required, the supplied .au3 sample files for the project, as well as the supplied includes; Create a new project (.cbp) and added all these files (select *); Hit Build! The output file should be created as expected. The challenge here is not compiling AutoIt to machine code, but in developing the compiler friendly parts of AutoIt at a pace that matches user needs. By proving that AutoIt can be compiled like this, even if it first has to be transliterated into a lower level language, such as C in this case, the door is open for full function compiled AutoIt executables - in machine code. This also places AutoIt in a position where it can produce compiled scripts, much the same way Lua does. At this time the achievement is getting the idea to work in practice. Even baby steps will change the way AutoIt can be used in the future. Watch this space. Skysnake
    1 point
  8. TheDcoder

    Process UDF

    Version 1.3

    1,736 downloads

    Hello Everyone , Are you tired of searching the forum for getting both the exit code & the stdout output? Then your are in the right place! With this UDF you can get the both output & exit code of the command or the console app! Or you can get the exit code of another process without having to use RunWait... Features: 1. Simple & Lightweight (15 KB) 2. Detailed comments & description 3. Flexible functions with many optional parameters A BIG THANKS TO PsaltyDS for the functions! 2 of the (main) functions in the UDF are his work List of functions:
    1 point
  9. kcvinu

    GRM Helper

    Version 1.0.0

    346 downloads

    This program will help you to automatically generate code for GUIRegisterMsg function. Select a control name from the combo box. Then the listView will populate the events of that control. If you click on any event name, you can see the event description in the edit box. Type your control's handle in the Control Handle textbox. Then type the line number where you want to call the function. Then type the line number where you want to add the actual function code. Then press Insert ToSciTE button. That's all. Here is the code generated by this program. GUIRegisterMsg($WM_COMMAND, "WM_COMMAND") Func WM_COMMAND($hWnd, $iMsg, $wParam, $lParam) #forceref $hWnd, $iMsg Local $hWndFrom, $iIDFrom, $iCode, $hWndListBox If Not IsHWnd($Sample) Then $hWndListBox = GUICtrlGetHandle($Sample) $hWndFrom = $lParam $iIDFrom = BitAND($wParam, 0xFFFF) ; Low Word $iCode = BitShift($wParam, 16) ; Hi Word Switch $hWndFrom Case $Sample, $hWndListBox Switch $iCode Case $LBN_SELCHANGE ; Insert your code here Case $LBN_DBLCLK ; Insert your code here Case $LBN_SELCANCEL ; Insert your code here EndSwitch EndSwitch Return $GUI_RUNDEFMSG EndFunc ;==>WM_COMMAND
    1 point
×
×
  • Create New...