
BatMan22
Active Members-
Posts
274 -
Joined
-
Last visited
-
Days Won
1
BatMan22 last won the day on January 19 2018
BatMan22 had the most liked content!
Recent Profile Visitors
BatMan22's Achievements

Universalist (6/7)
21
Reputation
-
Hi All, I've been playing with my own home server and one of the cool things that I've been playing with is running my own LLM for privacy purposes plus to mainly screw around. The only programming language that I really 'know' is autoit. I would love to use my LLM to help me with AutoIT, in order to really get it to understand that language, I would need to scrape the forums / help files. I'm sure I could upload the help files if it was ok but I'm not comfortable scraping the forums, especially without permission. Is it possible instead to get like monthly 'scrapes' or something so I don't have to do my own? I imagine that scraping every page uses up a decent amount of resources and I don't feel comfortable doing that without permission / sharing / finding a better alternative. Any ideas? Admins? Better options? Also anyone know how to turn all the help files into PDF's or something for easier LLM digestion?
-
Can someone delete this string.. I didn't see the @scriptdir that needs to be removed. I am dumb.
-
Global $sFilename = @ScriptDir & "C:\Users\Username\Desktop\File.xlsx" Global $sConnectionString = 'Provider=Microsoft.ACE.OLEDB.12.0;Data Source=' & $sFilename & ';Extended Properties="Excel 12.0 Xml;HDR=YES"' $oConnection.Open($sConnectionString) ; Open the connection Hi Guys, I'm trying to connect to a CLOSED excel file with the OLEDB libraries and am getting an error when I attempt to open the file, I'm using the example as a reference but it seems like it's original version + this version doesn't work. Does it require admin perhaps (I don't have admin on this PC)? Opening the file doesn't help either. I get the error below: "C:\Users\Username\Programming\ExcelReadWorking - Copy.au3" (34) : ==> The requested action with this object has failed.: $oConnection.Open($sConnectionString) $oConnection^ ERROR
-
The code below to call the ChatGPT API was generated completely by ChatGPT itself. Enjoy. It's able to write code in autoit, at least at a beginner level pretty darn well. Took some poking but it works. Also a word of warning, my API key took a few minutes to start working after being generated if you want to use the API. Seems like we're well on our way to being replaced lol. EDIT: Apologies, I should have mentioned that it's not free. You need API access. ; Store your API key in a variable Local $api_key = "yourkey" ; Create the WinHttpRequest object Local $oHTTP = ObjCreate("WinHttp.WinHttpRequest.5.1") ; Open a POST request to the OpenAI API $oHTTP.Open("POST", "https://api.openai.com/v1/engines/davinci-codex/completions", False) ; Set the headers for the request $oHTTP.SetRequestHeader("Content-Type", "application/json") $oHTTP.SetRequestHeader("Authorization", "Bearer " & $api_key) ; Send the request with the prompt and temperature $oHTTP.Send('{"prompt": "What is an atom made of?", "temperature": 0.7}') ; Get the response text Local $response = $oHTTP.ResponseText ConsoleWrite("Generated text: " & $response & @CRLF)
-
Weird Missing Send Key Behavior
BatMan22 replied to BatMan22's topic in AutoIt General Help and Support
Console write matches expected output 100% of the time I'll try the SendKey Delay, thanks! -
Weird Missing Send Key Behavior
BatMan22 replied to BatMan22's topic in AutoIt General Help and Support
So the output above shows the general values (they change) but: $SampleID in this case is 2208F65-001A.. the general pattern remains the same but the values roll over with time JFlag is either 0,-1, or "J-Flag" or nothing TestCode is "525.3_W" or nothing Matrix is usually nothing, but sometimes "Water" or "Soil" Or "w" or "s" Working on*2208F65-001A*Testcode: 525.3_W DF IS: 1 JF Status is -> Matrix is : Splitkey start: DF,ENTER,SPACE Splitkey is->DF< Splitkey is->ENTER< Splitkey is->SPACE<2208F66-001A 525.3_W 2208F66-001A<SampleID - JFlagRet>-1 2208F66-001A 525.3_W Working on*2208F66-001A*Testcode: 525.3_W DF IS: 1 JF Status is -> J-Flag Matrix is : Splitkey start: DF,ENTER,SPACE Splitkey is->DF< Splitkey is->ENTER< Splitkey is->SPACE<2208F68-001A 525.3_W 2208F68-001A<SampleID - JFlagRet>0 2208F68-001A 525.3_W Working on*2208F68-001A*Testcode: 525.3_W DF IS: 1 JF Status is -> Matrix is : Splitkey start: DF,ENTER,SPACE Splitkey is->DF< Splitkey is->ENTER< Splitkey is->SPACE<2208F70-001A 525.3_W 2208F70-001A<SampleID - JFlagRet>0 2208F70-001A 525.3_W Working on*2208F70-001A*Testcode: 525.3_W DF IS: 1 JF Status is -> Matrix is : Splitkey start: DF,ENTER,SPACE Splitkey is->DF< Splitkey is->ENTER< Splitkey is->SPACE<2208F65-001A 525.3_W 2208F65-001A<SampleID - JFlagRet>0 2208F65-001A 525.3_W Working on*2208F65-001A*Testcode: 525.3_W DF IS: 3 JF Status is -> Matrix is : Splitkey start: DF,ENTER,SPACE Splitkey is->DF< Splitkey is->ENTER< Splitkey is->SPACE<2208F66-001A 525.3_W 2208F66-001A<SampleID - JFlagRet>-1 2208F66-001A 525.3_W Working on*2208F66-001A*Testcode: 525.3_W DF IS: 3 JF Status is -> J-Flag Matrix is : Splitkey start: DF,ENTER,SPACE Splitkey is->DF< Splitkey is->ENTER< Splitkey is->SPACE<2208F68-001A 525.3_W 2208F68-001A<SampleID - JFlagRet>0 2208F68-001A 525.3_W Working on*2208F68-001A*Testcode: 525.3_W DF IS: 3 JF Status is -> Matrix is : Splitkey start: DF,ENTER,SPACE Splitkey is->DF< Splitkey is->ENTER< Splitkey is->SPACE<2208F70-001A 525.3_W 2208F70-001A<SampleID - JFlagRet>0 2208F70-001A 525.3_W Working on*2208F70-001A*Testcode: 525.3_W DF IS: 3 JF Status is -> Matrix is : Splitkey start: DF,ENTER,SPACE Splitkey is->DF< Splitkey is->ENTER< Splitkey is->SPACE< -
Weird Missing Send Key Behavior
BatMan22 replied to BatMan22's topic in AutoIt General Help and Support
Bump.. -
Weird Missing Send Key Behavior
BatMan22 replied to BatMan22's topic in AutoIt General Help and Support
BUMP.. -
Weird Missing Send Key Behavior
BatMan22 replied to BatMan22's topic in AutoIt General Help and Support
BUMP.. Also tried adding in coding below, hoping it was a language issue or something.. Global Const $iLanguage = 0x0409 Local $hWnd _WinAPI_GetKeyboardLayout($hWnd) _WinAPI_SetKeyboardLayout( $hWnd , $iLanguage ) -
Weird Missing Send Key Behavior
BatMan22 replied to BatMan22's topic in AutoIt General Help and Support
Just to rule it out, I also attempted a restart of the whole PC / Switched from $i to $m / Case vs If Else / Send vs _SendEx .... So confused on what is going on. -
Weird Missing Send Key Behavior
BatMan22 replied to BatMan22's topic in AutoIt General Help and Support
@Zedna In reference to the link you posted, sending with Send("{ENTER}", $SEND_RAW) obviously types in {Enter} but it does prove that it doesn't miss when it's doing that. Also the control send is not available for this application, I wish it was. Also the problem persists with Send or _SendEx -
Weird Missing Send Key Behavior
BatMan22 replied to BatMan22's topic in AutoIt General Help and Support
1) Post source of _SendEx() - see below 2) add some Sleep() after Send() - 100ms sleep didn't do anything 3) look here - Will check on this post 4) Also be sure if you don't reuse/reset variable $i somewhere inside functions called from your For/Next loop where is $i declared - don't see it, also console output confirms that it scrolls through every command, see below. Working on*2208F65-001A*Testcode: 525.3_W DF IS: 1 JF Status is -> Matrix is : Splitkey start: DF,ENTER,SPACE Splitkey is->DF< Splitkey is->ENTER< Splitkey is->SPACE<2208F66-001A 525.3_W 2208F66-001A<SampleID - JFlagRet>-1 2208F66-001A 525.3_W Working on*2208F66-001A*Testcode: 525.3_W DF IS: 1 JF Status is -> J-Flag Matrix is : Splitkey start: DF,ENTER,SPACE Splitkey is->DF< Splitkey is->ENTER< Splitkey is->SPACE<2208F68-001A 525.3_W 2208F68-001A<SampleID - JFlagRet>0 2208F68-001A 525.3_W Working on*2208F68-001A*Testcode: 525.3_W DF IS: 1 JF Status is -> Matrix is : Splitkey start: DF,ENTER,SPACE Splitkey is->DF< Splitkey is->ENTER< Splitkey is->SPACE<2208F70-001A 525.3_W 2208F70-001A<SampleID - JFlagRet>0 2208F70-001A 525.3_W Working on*2208F70-001A*Testcode: 525.3_W DF IS: 1 JF Status is -> Matrix is : Splitkey start: DF,ENTER,SPACE Splitkey is->DF< Splitkey is->ENTER< Splitkey is->SPACE<2208F65-001A 525.3_W 2208F65-001A<SampleID - JFlagRet>0 2208F65-001A 525.3_W Working on*2208F65-001A*Testcode: 525.3_W DF IS: 3 JF Status is -> Matrix is : Splitkey start: DF,ENTER,SPACE Splitkey is->DF< Splitkey is->ENTER< Splitkey is->SPACE<2208F66-001A 525.3_W 2208F66-001A<SampleID - JFlagRet>-1 2208F66-001A 525.3_W Working on*2208F66-001A*Testcode: 525.3_W DF IS: 3 JF Status is -> J-Flag Matrix is : Splitkey start: DF,ENTER,SPACE Splitkey is->DF< Splitkey is->ENTER< Splitkey is->SPACE<2208F68-001A 525.3_W 2208F68-001A<SampleID - JFlagRet>0 2208F68-001A 525.3_W Working on*2208F68-001A*Testcode: 525.3_W DF IS: 3 JF Status is -> Matrix is : Splitkey start: DF,ENTER,SPACE Splitkey is->DF< Splitkey is->ENTER< Splitkey is->SPACE<2208F70-001A 525.3_W 2208F70-001A<SampleID - JFlagRet>0 2208F70-001A 525.3_W Working on*2208F70-001A*Testcode: 525.3_W DF IS: 3 JF Status is -> Matrix is : Splitkey start: DF,ENTER,SPACE Splitkey is->DF< Splitkey is->ENTER< Splitkey is->SPACE< SendEx source below: ; #FUNCTION# ==================================================================================================================== ; Name ..........: _SendEx ; Description ...: alternative to built-in Send() function which prevents modifier keys from being left in a pressed state ; Syntax ........: _SendEx($sSendKeys[, $iTimeout[, $sReleaseKeys[, $hUser32Dll]]]) ; Parameters ....: $sSendKeys - string of keys to send in Send() format ; $hUser32Dll - [optional] handle to user32.dll ; $iTimeout - [optional] maximum time in ms to attempt to release pressed keys (minimum = 250) ; $sReleaseKeys - [optional] comma seperated string of keys to release before issuing Send() (no spaces). ; defaults to: Shift, Ctrl, Alt, L Win, R Win ; Return values .: Success returns 1, else sets @error to 1 and returns an error message string ; Release date ..: 25-May-2014 ; Modify date ...: 21-Sep-2014 ; Author ........: iCode ; Modified by ...: ; Remarks .......: ; Related .......: Send() ; Link ..........: ; Example .......: No ; =============================================================================================================================== Func _SendEx($sSendKeys, $hUser32Dll = "", $iTimeout = 2000, $sReleaseKeys = "0x10,0x11,0x12,0x5B,0x5C") Local $bCloseDll, $sRet Local $iDelay = Opt("SendKeyDelay") + Opt("SendKeyDownDelay") If $iDelay < 50 Then $iDelay = 50 Local $aReleaseKeys = StringSplit($sReleaseKeys, ",") If @error Then Return SetError(1, 0, "Failed to create release key array") If $hUser32Dll <> "user32.dll" Then $hUser32Dll = DllOpen("user32.dll") If @error Then Return SetError(1, 0, "Failed to open handle to user32.dll") $bCloseDll = True EndIf $sRet = __ReleaseKeys($aReleaseKeys, $iTimeout, $hUser32Dll) If Not @error Then Send($sSendKeys) Sleep($iDelay) $sRet = __ReleaseKeys($aReleaseKeys, $iTimeout, $hUser32Dll) EndIf If $bCloseDll Then DllClose("user32.dll") If $sRet Then Return SetError(1, 0, $sRet) Return 1 EndFunc ;==>_SendEx ; #INTERNAL_USE_ONLY# =========================================================================================================== ; Name ..........: __ReleaseKeys ; Description ...: release pressed keys ; Syntax ........: __ReleaseKeys(Byref $aReleaseKeys, $iTimeout, $hUser32Dll) ; Parameters ....: $aReleaseKeys - [in/out] An array of unknowns. ; $iTimeout - An integer value. ; $hUser32Dll - A handle value. ; Return values .: None ; Author ........: iCode ; Modified ......: 25-May-2014 ; Remarks .......: ; Related .......: ; Link ..........: ; Example .......: No ; =============================================================================================================================== Func __ReleaseKeys(ByRef $aReleaseKeys, $iTimeout, $hUser32Dll) If $iTimeout < 50 Then $iTimeout = 250 Local $aRet, $hTimer = TimerInit() For $i = 0 To UBound($aReleaseKeys) - 1 $aRet = DllCall($hUser32Dll, "short", "GetAsyncKeyState", "int", $aReleaseKeys[$i]) If @error Then Return SetError(1, 0, "Dll call GetAsyncKeyState failed with key: " & $aReleaseKeys[$i]) If BitAND($aRet[0], 0x8000) <> 0 Then Do Sleep(100) DllCall($hUser32Dll, "int", "keybd_event", "int", $aReleaseKeys[$i], "int", 0, "long", 2, "long", 0) If @error Then Return SetError(1, 0, "Dll call keybd_event failed with key: " & $aReleaseKeys[$i]) $aRet = DllCall($hUser32Dll, "short", "GetAsyncKeyState", "int", $aReleaseKeys[$i]) If TimerDiff($hTimer) >= $iTimeout Then Return SetError(1, 0, "Time out limit reached") Until BitAND($aRet[0], 0x8000) = 0 EndIf Next EndFunc ;==>__ReleaseKeys -
noob need help for "while" command
BatMan22 replied to zist1982's topic in AutoIt General Help and Support
Pretty sure you just replace that and it should be fine, also use the brackets on the forums to help with inserting autoit code Replace: call ("_Kz") with _Kz() Also: call ("_test") ---> _test() -
Hi guys... So I have a GUI designed to be as 'universal' as possible.. and I am stuck on some weird behavior.. In my GUI I read a text box that is set to.. "SID,JF,{RIGHT},TC,SPACE,DF,ENTER" Each of those values correspond to an value for the program to type.. But when the values to enter get to be too long the program seems to "miss"? I have also tried _SendEx and it doesn't seem to help either.. But when I shorted to "SID,ENTER,SPACE" everything works fine and I can't figure out why I've even tried disabling commands and there's no difference.. Relevant Code Section: Local $splitkeys = StringStripWS(GUICtrlRead($KeyInp), $STR_STRIPALL) ; Import in the Gui Control Text ConsoleWrite(@CRLF & "Splitkey start: " & $splitkeys) $splitkeys = StringSplit($splitkeys, ",", 2) ;Split into seperate actions _ArrayDisplay($splitkeys) ; Just for testing ;~ Exit For $i = 0 To UBound($splitkeys) - 1 ;Go through array of different actions and enter as needed Sleep(20) ConsoleWrite(@CRLF & "Splitkey is->" & $splitkeys[$i] & "<") If $splitkeys[$i] = "SIDM" Then If $Matrix <> "" Then _SendEx($SampleID) _SendEx(" " & $Matrix) Else _SendEx($SampleID) EndIf ElseIf $splitkeys[$i] = "SID" Then _SendEx($SampleID) ElseIf $splitkeys[$i] = "TC" Then _SendEx($TestCode) ElseIf $splitkeys[$i] = "DF" Then _SendEx("x" & $DF) ElseIf $splitkeys[$i] = "JF" Then _SendEx($JFlag & " ") ElseIf $splitkeys[$i] = "Space" Then _SendEx(" ") ElseIf $splitkeys[$i] = "ENTER" Then ;<-- MISSING KEYSTROKES ;~ Sleep(200) Send("{ENTER}") ElseIf $splitkeys[$i] = "{LEFT}" Then _SendEx("{LEFT}") ElseIf $splitkeys[$i] = "{RIGHT}" Then _SendEx("{RIGHT}") ElseIf $splitkeys[$i] = "{DOWN}" Then _SendEx("{DOWN}") ElseIf $splitkeys[$i] = "{UP}" Then _SendEx("{UP}") Else ConsoleWrite("NoMatchFound" & @CRLF) _SendEx($splitkeys[$i]) EndIf Next Also tested case and it seems similar in behavior For $i = 0 To UBound($splitkeys) - 1 ConsoleWrite(@CRLF & "Splitkey is->" & $splitkeys[$i] & "<") Select Case $splitkeys[$i] = "SIDM" If $Matrix <> "" Then _SendEx($SampleID) _SendEx(" " & $Matrix) Else _SendEx($SampleID) EndIf Case $splitkeys[$i] = "SID" _SendEx($SampleID) Case $splitkeys[$i] = "TC" _SendEx($TestCode) Case $splitkeys[$i] = "DF" _SendEx("x" & $DF) Case $splitkeys[$i] = "JF" _SendEx($JFlag & " ") Case $splitkeys[$i] = "Space" _SendEx(" ") Case $splitkeys[$i] = "ENTER" Send("{ENTER}") Case $splitkeys[$i] = "{LEFT}" _SendEx("{LEFT}") Case $splitkeys[$i] = "{RIGHT}" _SendEx("{RIGHT}") Case $splitkeys[$i] = "{DOWN}" _SendEx("{DOWN}") Case $splitkeys[$i] = "{UP}" _SendEx("{UP}") Case Else ConsoleWrite("NoMatchFound" & @CRLF) _SendEx($splitkeys[$i]) EndSelect Next
-
GuiFileList not showing Set Data
BatMan22 replied to BatMan22's topic in AutoIt General Help and Support
HI @Subz, yup, please excuse my braindamage.. I am re-writing this program from scratch to use SQL instead of text files.. and I forgot to disable a function that updates the control to blank, because the file no longer exists.