39 posts in this topic
I've ported these two functions from PHP to AU3 to work with URLs.
Made them for those who work with libraries like HTTP.au3 (not the one I coded), that needs passing the server domain, path, etc., instead of the full URL.
Grab the lib here.
ParseURL( $sURL )
Parses the URL and splits it into defined parts. Returns an array:
 = Full URL (same as $sURL)  = Protocol (i.e.: http, https, ftp, ws...)  = Domain  = Port (or null if not specified)  = Path (or null if not specified)  = Query string (everything after the ? - or null if not specified) Example:
$aExample = ParseURL("https://google.com:8080/?name=doe") MsgBox(0, "Test", "URL: " & $aExample & @CRLF & _ "Protocol: " & $aExample & @CRLF & _ "Domain: " & $aExample & @CRLF & _ "Port: " & $aExample & @CRLF & _ "Path: " & $aExample & @CRLF & _ "Query string: " & $aExample)
ParseStr( $sStr )
Parses a query string (similar to the  of the previous function) and returns a multidimensional array, where:
 = number of variables found  = ununsed  = key name of the first variable  = first variable value (already URL decoded) [n] = key name of the nth variable [n] = nth variable value (already URL decoded) Example:
include <Array.au3> ; need only to do _ArrayDisplay, not needed by the lib _ArrayDisplay(ParseStr("foo=bar&test=lol%20123")) #cs Result is:  = 2  = ununsed  = foo  = bar  = test  = lol 123 #ce Feel free to fork!
#include <Date.au3> #include <TrayConstants.au3> HotKeySet("^d", "WhatIsToday") Global $Today = _Date_Time_GetSystemTime While 1 Sleep(100) WEnd Func WhatIsToday() TrayTip("Today's date", "Today is... " & $Today, 8) Sleep(8000) TrayTip("", "", 0) EndFunc ;==>WhatIsToday all it outputs into tray bubble is: Today is...
without getting the system time as text
So I have a little script here
Func getThe () Local $nearPix = 0123 Local $winPos = WinGetPos ($workWin) FFSaveBMP ("yBarPosArea", "True" , 600, 239, 600, 555, 30, $workWin) $nearPix = FFNearestPixel (600, 220, "0xC1C1C1" , False, $workWin) If $nearPix == 0123 Then ConsoleWrite ("No val for NearPix") ElseIf $nearPix <> 0123 Then ConsoleWrite ("Val is there") ConsoleWrite ($nearPix&","&$nearPix&@CR) EndIf EndFunc And when it comes time to run it I get a return of
When it says "non-accessible variable" , what is it meaning by that? The scope is "Local" and it is within the same function. The variable was even referenced in the step right before the one throwing the error. Any insight would be thoroughly appreciated. Thank you!
I am trying to get my code to be loopable based off of a variable count for example number of images selected variable is named $imgCount = 6 (meaning there were 6 images selected) I need to know if this will work assuming all images paths are stored in the gui created...
That would be the variable names that would equal the gui for guictrlread ....
$ImUploadCount = 0 $imageCounter = 6 ; has been set by incrementing every time an image was picked via gui button 1-6 we will assume it equals 6 Func Upload() Do $imUpload = $ImUploadCount + 1 _IEFormElementSetValue($browsefield, GUICtrlRead($Image & $imUpload)) Until $imageCounter = $imUpload So Essentially will $Image & $imUpload provide $image1, $image2, $image3, etc... when it sets the value then uploads? or will that cause a problem...? "is there a better way to do this?
Hi AutoIt community!
I have a quick question. According to AutoIt help file on Variables,
So what the meaning of "auJasperatically destroyed"? Is it completely destroyed or might be destroyed?
I am writing a security software and it is important to not let any password lingers in the memory. In a function, I have saved the password typed by user in a local var. I am not sure if I need to reset this variable before the function ends. (Or is there any better security practices?)
Thanks very much!