Jump to content

Search the Community

Showing results for tags 'variable'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • General
    • Announcements and Site News
    • Administration
  • AutoIt v3
    • AutoIt Help and Support
    • AutoIt Technical Discussion
    • AutoIt Example Scripts
  • Scripting and Development
    • Developer General Discussion
    • Language Specific Discussion
  • IT Administration
    • Operating System Deployment
    • Windows Client
    • Windows Server
    • Office

Categories

  • AutoIt Team
    • Beta
    • MVP
  • AutoIt
    • Automation
    • Databases and web connections
    • Data compression
    • Encryption and hash
    • Games
    • GUI Additions
    • Hardware
    • Information gathering
    • Internet protocol suite
    • Maths
    • Media
    • PDF
    • Security
    • Social Media and other Website API
    • Windows
  • Scripting and Development
  • IT Administration
    • Operating System Deployment
    • Windows Client
    • Windows Server
    • Office

Categories

  • Forum FAQ
  • AutoIt

Calendars

  • Community Calendar

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Location


WWW


Interests

  1. I have a string containing the full path of an executable and an array of executables without their paths. I am trying to compare the string to the list in the array and if a match is found, remove it from the array. The entry get removed from the array successfully, and after checking its return result, uses it to update the ubound if it succeeded, but it doesn't want to update to the new value. Any ideas what I am doing wrong? It acts like it is read-only. #include <Array.au3> #include <File.au3> Local $sApp_Exe = "F:\App\Nextcloud\nextcloud.exe" Local $aWaitF
  2. Hello, I have been using Image Search UDF 2.0.2.0 without any issue, but today when I went to run the script I have been using for a few months now, I received the following error. How can I determine where the issues lies? Any suggestions on what the issue might be? As far as I can tell, the variable has been declared. I included the function from the UDF. Thanks! "c:\install\include\_ImageSearch_UDF.au3" (117) : ==> Variable used without being declared.: If (FileExists($ImageSearchDLL_Path) = 0) Then _ImageSearch_CheckDLL() If (FileExists(^ ERROR
  3. Version 1.0.0

    101 downloads

    About AutoIt-DD AutoIt-DD is an carbon copy of Laravels dd helper. DD stands for "Dump and DIE" and is a great tool for debugging AutoIt variables Features Get useful information about any AutoIt variable Nested Arrays and Scripting dictionaries Multi DIM arrays Great structure and colored output Example In Example.au3 you can run a fully featured example, but I also provided a print screen for you lazy people
  4. This is a naive question, but here goes. If a variable contains sensitive information, like a password, is there any value to overwriting its contents before exiting the script? In other words, in the example below, would someone poking around in memory after the script finishes still be able to find the original value of variable $sPass? (Putting aside, for present purposes, the obvious fact that the script itself contains the sensitive information.) Is there a better way to cover one's tracks, as it were? Thanks in advance. Local $sPass = "My password is 'very+very_strong'
  5. Hello all! Getting this error : (22) : ==> Variable used without being declared.: if $vNumber = 0 Then if ^ ERROR But I'm sure I have defined the variable, as in the top of my script has Global $vNumber = 0 How would I go about fixing this?
  6. Hi all, I wasnt active in this Forum forum for Years. 😅 Since I need something with Json in AutoIt i write a little UDF to save a variable to file to read it with another language - and back. After a while until my other script grows i thought - lets integrate all variables wich is possible, because i want have arrays to. This is my first public UDF in Autoit - normaly my AutoIt scripts are quick an dirty.... - like the examples for this udf. - someone want to write nice examples? I tried to write this UDF properly, cared for processing speed, low mem consumption as possible, a
  7. I am going through the AutoIt Wiki and soaking up a lot of great information. On the “Best Coding Practices” page at https://www.autoitscript.com/wiki/Best_coding_practices#Scopes_of_Variables there seems to be a minor detail missing. In the “Variable Initialization” section at https://www.autoitscript.com/wiki/Best_coding_practices#Variable_Initialization , there are references to a data type $o, but in the table listing prefixes and their data types, there does not appear to be a prefix “o”. I assume that this is for Object?
  8. I have this code It gets variable input from GUI to run a loop and write to a text file then copy it to the clipboard But the thing is code runs normally with $px and $py <100 or both > 100 or with $px <10 and $py>100 but It's wrong with 10<$px <100 and $py >100 Can anyone tell me why? Func clone() Local $px = GUICtrlRead($input1) Local $py = GUICtrlRead($input2) Local $temp = "C:\temp.csv" FileDelete($temp) While $px <= $py Local $name = "P"&$px FileWrite($temp, " & $name & ""&
  9. Hi Guys, Is it possible to get a variable on your For..Next loop? Local $Lines1 = _FileCountLines(C:\temp\test.txt) Local $linesToCount2 = $Lines1 + 2 $var = Number($linesToCount2) For $count = 1 To _FileCountLines($FileRead2) Step 1 For $i = $var To $count Next ;Code does stuff here Next Somehow my code doesn't work even though I thought I could convert the variable to a Integer / Number. This code I posted above does not move to the next value. But the code below does... why is that? For $count = 1 To _FileCountLines($FileRead2) Step 1 For $i =
  10. I got that func Func makeHelpImgGUI($title,$width,$height,$img) $img = GUICtrlCreatePic("",20,40,$width,$height) _ResourceSetImageToCtrl($img, "HERE") EndFunc and I call this func like that makeHelpImgGUI("Image",1190, 800,$SETTINGS_JPG) so what is the problem in the parameter where is - "HERE" I need value of img but passed as string so $img = $SETTINGS_JPG and how make it "SETTINGS_JPG" I tried something like that but not work Func makeHelpImgGUI($title,$width,$height,$img) $name_str = String($img) $nam
  11. This script used to work on an older version of AutoIT. Currently I am running AutoIT v3.3.14.5 and it's failing. Func PublicIP() ;Post public facing IP address Local $url = 'https://www.google.com/search?client=opera&q=what+is+my+ip&sourceid=opera&ie=UTF-8&oe=UTF-8' Local $getIPaddress = BinaryToString(InetRead($url)) Local $sStart = 'clamp:2">' Local $sEnd = '</div>' Local $ipaddress = _StringBetween($getIPaddress, $sStart, $sEnd For $i In $ipaddress MsgBox(0, 'External IP', "Your public IP address is &
  12. Hello, I wrote a benchmark script to measure variable declarations to find out whether you should focus more on static or global variables #cs ---------------------------------------------------------------------------- AutoIt Version: 3.3.14.5 #ce ---------------------------------------------------------------------------- #Region Pre-Setting Local $iTally1 = 0 Local $iTally2 = 0 Local $iTally3 = 0 Local $iTally4 = 0 Local $iTally5 = 0 Local $iTally6 = 0 Local $iTally7 = 0 Global $GLOBALCONST1 = 1 Global $GLOBALCONST2 = 1 Global $GLOBALCONST3 = 1 Global $G
  13. Is this better to check a variable before you assign it to a value that could be the same? for example: local $EmptyLog = false func WriteLog($text) _guictrledit_appendtext($log, ($EmptyLog ? @CRLF : $empty) & $text) If $EmptyLog Then $EmptyLog = False endfunc or does AutoIt behind the scenes already check this? i guess overwriting memory with the same value over and over again is not good if you can prevent this with a check?
  14. I see $hWnd used as a local variable in a lot of script examples. I know the 'h' is used for handles, but what is the 'Wnd' short for? Thanks!
  15. i have seen many pointing out issues related to this, i tried reading through them - still unable to solve mine.. i have a script which reads certain lines based on a search item, this is an iterative process - the ldflst_file gets updated for each iteration and the script finds the line number which has the search item. this works perfectly for few iterations, but stops in some cases abruptly with the error = Subscript used on non-accessible variable $aRead^ ERROR I have verified that the search item is present in the file. what could be the reason for this code to stop in certain
  16. Hello, i'm trying to rename a variable to another variable name (not the value attached to the variable). This would save me TONS of coding. Here is an example: <autoit> Local $clear1="$SATJ" ;sets the $clear1 variable to become $SATJ GUICtrlSetState($clear1 & "3", $GUI_UNCHECKED) ;i want this to come out to be $SATJ3, it should look something like - GUICtrlSetState($SATJ3, $GUI_UNCHECKED) </autoit> Is this possible? I've been searching all the forums and help files for hours. My javascript friend referenced me to the solution on JS, wh
  17. Howdy, this is my first post, massive fan of autoit. I've searched and tried and I would just like people who are better at this than me to let me know if this is even a thing. I'd like to perform just a variable. For example, it would be. *see inserted code* So what i'm wanting is, create the constant $test, and that variable would be what is followed after the = . Then perform the _FileCreate. Then perform the variable. Logically or in my head rather.. That variable is declared and is equal to what it is set to above, therefore just placing the variable plainly in the script, it sho
  18. I have a script , during compilation and test execution, it worked perfectly but sometimes I am getting error as "Variable used without being declared." I understood somewhere in the branching logic this is happening. But not able to find it exactly. As I am using multiple include statements.the line number is also not giving accurately. Can anyone suggest what is the approach to resolve this?
  19. Is this possible: Executing a function from an include, but taking the function name from a gui input and then executing that function using the include: #include <Something.au3> ;input reads "Tree" $functionName = GuiCtrlRead($input1) $functionName(1) And the include is gonna have Func Tree($x) If $x = 1 Then $this = "text" MsgBox(0,$this,"whatever") EndFunc is it possible?
  20. Hello everyone, I discovered a bug yesterday and I posted it at the bug tracker: I also made a simple script which can be used to reproduce the bug: CreateVariable() ConsoleWrite($sGlobalVariable & @CRLF) Func CreateVariable() Global $sGlobalVariable = "Foobar" EndFunc The bug was closed by @BrewManNH: While I partially agree with the above statement, My code was not practical enough... so @mLipok advised me to create a thread on the forums with practical code (Thanks!). That is the point of this thread, I am going to provide the code where I expe
  21. I keep losing the count of my $r varable when I go into the dropdown () function and call the same function. #include <Excel.au3> #include <AutoItConstants.au3> #include<GUIConstantsEx.au3> #include<EditConstants.au3> #include<GUIConstants.au3> Global $iBox, $oExcel, $oWorkbook, $r = 1, $x = 3 HowMany() Excel () Dropdown () Sleep (500) Func Dropdown () $list = GUICreate("Chart", 225, 80) $combobox = GUICtrlCreateCombo("Clinic 1", 10, 10, 120, 20) GUICtrlSetData(-1, "Clinic 2|Clinic 3|Clinic 4")
  22. Local $okay _FileReadToArray("Okay.txt", $okay) ; read the list of names to array For $i = 1 To UBound($okay) - 1 $Read = $okay[$i] If I run this and it goes to the end of Okay.txt it returns an error. "Array variable has incorrect number of subscripts or subscript dimension range exceeded.:" so can I either exitloop if its run through the file or add some error checking that exitloop if array = empty? Thanks in advance.
  23. Hi folks, I'm hoping someone can help me out here. Background: I have the need to run a program with admin credentials (#RequireAdmin), and then get the SID of the locally logged in account. Not the admin account. If you look at the attached script, Line 16 uses the @UserName variable and returns the SID for the admin account I used to launch the app. I want to use line 17 which passes the result of the _GetUsername function which is a username using ($UserName) to the WMIService. I'm getting " The requested action with this object has failed.:" error message. Any
  24. Hi I need help, I found script to check computer model. I want use it in loop to chceck multiple pc`s (targets.txt with computer names). But when i try use inside loop i get error: Variable must be of type "Object" and I dont know how to fix this Plz help Local $targets = @ScriptDir& "\targets.txt" Local $log_name = "\scan.log" $msgBox = MsgBox(4, "Scan", "need tergets.txt") Example() Func Example() If $msgBox = 7 Then exit EndIf If Not FileExists($targets) Then MsgBox($MB_SYSTEMMODAL, &
  25. i have this code running but it just would not start the code: Local $rndSleep = Int (Random(180000,240000,1000)) MsgBox($MB_SYSTEMMODAL, "NaaaNuuu", "This message box will show the sleeptime after closing the tabs, you got " & $rndSleep & " seconds left.", $rndSleep) here is the error it shows me: "C:\Users\numan\Desktop\scipiie.au3" (23) : ==> Variable used without being declared.: MsgBox($MB_SYSTEMMODAL, "NaaaNuuu", "This message box will show the sleeptime after closing the tabs, you got " & $rndSleep & " seconds left.", $rndSleep) MsgBox(^
×
×
  • Create New...