Jump to content

Search the Community

Showing results for tags 'question'.

  • 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

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Member Title


Location


WWW


Interests

Found 10 results

  1. I'm trying to have an auto clicker where I save x,y positions and have potential text (like click counter) as well as time between clicks (4 parameters). I'm saving the clicks in an array but can't get the function to work Local $aClicks[3][4] = [[100, 100, "Test", 1000] _ , [200, 200, " Test2", 1500] _ , [200, 200, " Test3", 2000]] Clicking($aClicks) With Clicking being this function Func Clicking($x, $y, $s = "", $z = 1000) But I'm constantly getting an error pointing to "Clicking($aClicks)" and saying Error: Incorrect number of parameters in function call. If I write this instead it works Local $aClicks[3][2] = [[100, 100] _ , [200, 200] _ , [200, 200]] Clicking($aClicks, "Test", 1000) But then I only get the X and Y pos. I just don't understand how the first case is giving me errors, given the array is given 4 parameters to each element, which the function requires.
  2. #NoTrayIcon #Region ;**** Directives created by AutoIt3Wrapper_GUI **** #AutoIt3Wrapper_Res_Description=Rainmeter Suspend #AutoIt3Wrapper_Res_Fileversion=0.0.0.1 #AutoIt3Wrapper_Res_Fileversion_AutoIncrement=y #AutoIt3Wrapper_Res_ProductName=Rainmeter Suspend #EndRegion ;**** Directives created by AutoIt3Wrapper_GUI **** #include <WinAPI.au3> #include <WindowsConstants.au3> Opt("TrayAutoPause",0) while 1 sleep(5000) _IsFullScreen() WEnd Func _IsFullScreen () Local $hwnd = WinGetHandle ("[ACTIVE]") Local $aWinRect = WinGetPos ($hwnd) If ($aWinRect[2] >= _WinAPI_GetSystemMetrics($SM_CXSCREEN)) OR ($aWinRect[3] >= _WinAPI_GetSystemMetrics($SM_CYSCREEN)) Then _ProcessSuspend("rainmeter.exe") Else _ProcessResume("rainmeter.exe") EndIf EndFunc Func _ProcessSuspend($process) $processid = ProcessExists($process) If $processid Then $ai_Handle = DllCall("kernel32.dll", 'int', 'OpenProcess', 'int', 0x1f0fff, 'int', False, 'int', $processid) $i_sucess = DllCall("ntdll.dll","int","NtSuspendProcess","int",$ai_Handle[0]) DllCall('kernel32.dll', 'ptr', 'CloseHandle', 'ptr', $ai_Handle) If IsArray($i_sucess) Then Return 1 Else SetError(1) Return 0 Endif Else SetError(2) Return 0 Endif EndFunc Func _ProcessResume($process) $processid = ProcessExists($process) If $processid Then $ai_Handle = DllCall("kernel32.dll", 'int', 'OpenProcess', 'int', 0x1f0fff, 'int', False, 'int', $processid) $i_sucess = DllCall("ntdll.dll","int","NtResumeProcess","int",$ai_Handle[0]) DllCall('kernel32.dll', 'ptr', 'CloseHandle', 'ptr', $ai_Handle) If IsArray($i_sucess) Then Return 1 Else SetError(1) Return 0 Endif Else SetError(2) Return 0 Endif EndFunc I'm getting this error when running my script: "Error: Subscript used on non-accessible variable" I'm very confused because the script works 99% of the time and then I just get the random error. What am I missing?
  3. Is it possible to sign your script before compiling?
  4. Hello all I have a question please Is there a way to request the script for administrator privileges if a particular condition is met?? example local $path = RegRead("HKEY_CURRENT_USER\Software\test", "fullpath") if $fullPath = @scriptFullPath then Request for administrator privileges main() else main() endIf I hope to find a solution here Greetings to all
  5. Hi guys I have a question about the slider controle There is a problem with screen readers, wen we Using a screen reader We usually move between GUI controls using the tab key. But when you create a slider , beside to it there are buttons and check boxes or any other controls, When I move between the GUI controls using the tab key I can not find the slider. But if it were alone in the window, I would find it normally. Is there a solution to Solve this problem please? This is the code i tried #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> #include <MsgBoxConstants.au3> #include <SliderConstants.au3> main() Func main() GUICreate("slider", 200, 200, -1, -1) GUICtrlCreateGroup("slider", 10, 10, 240, 50) Local $idSlider1 = GUICtrlCreateSlider(50, 30, 200, 20, BitOr($TBS_DOWNISLEFT, $TBS_BOTH)) GUICtrlSetLimit(-1, 100, 0) ;GUIStartGroup("") Local $idButton = GUICtrlCreatebutton("Value?", 75, 70, 70, 20) GUISetState(@SW_SHOW) GUICtrlSetData($idSlider1, 10) while 1 switch GUIGetMsg() case $GUI_EVENT_CLOSE exit case $idButton MsgBox($MB_SYSTEMMODAL, "slider1", GUICtrlRead($idSlider1)) endSwitch Wend EndFunc [Click and drag to move]
  6. Hello, i have a problem, first i create two gui , first gui use Fuction Soundplay to play the music, if the music playing in the end, it auto change a new song like playlist on soundcloud, but the problem that while i press a button in gui 1 to open gui 2 , the song when it end it not change to a new song, wait for gui 2 close then begin change a new song, have anyway to make gui 1 still working while gui 2 is working too?
  7. Howdy! I've been reading through the OutLookEX documentation and examples for the past two days ( VERY well documented, very clear! ) https://www.autoitscript.com/wiki/OutlookEX_UDF_-_General But I've had trouble locating information on specifying what user to use. My outlook is linked to two email accounts and I can only manipulate the main account's stuff. A simple script I've been playing with is this ; Include Functions #include <OutlookEX.au3> ; Connect to Outlook Global $oOutlook = _OL_Open() If @error <> 0 Then Exit MsgBox(16, "Connect to Outlook", "Error connecting to Outlook. @error = " & @error & ", @extended = " & @extended) ;List the folders Global $aResult = _OL_FolderTree($oOutlook, "*") If @error <> 0 Then Exit MsgBox(16, "OutlookEX UDF: _OL_FolderTree Example Script", "Error accessing root folder. @error = " & @error) _ArrayDisplay($aResult, "OutlookEX UDF: _OL_FolderTree Example Script - All folders") It works like a charm but it only returns my main account's folders. I really hope I didn't overlook a wiki page or help file... Any assistance would be greatly appreciated! -Reiz
  8. Don't you just love it when a regular expression comes out on top?! I know I do.. Local $hTimer = 0 $hTimer = TimerInit() For $i = 1 To 10000 _IsSystemDrive_Test_1('C') Next ConsoleWrite(TimerDiff($hTimer) & @CRLF) $hTimer = TimerInit() For $i = 1 To 10000 _IsSystemDrive_Test_2('C') Next ConsoleWrite(TimerDiff($hTimer) & @CRLF) Func _IsSystemDrive_Test_1($sDrive) Local $aArray = [@HomeDrive, _ @ProgramFilesDir, _ @SystemDir, _ @WindowsDir] For $sFilePath In $aArray If StringLeft($sFilePath, 1) = $sDrive Then Return True EndIf Next Return False EndFunc ;==>_IsSystemDrive Func _IsSystemDrive_Test_2($sDrive) Return StringRegExp(@HomeDrive & '|' & @ProgramFilesDir & '|' & @SystemDir & '|' & @WindowsDir, '(?<=^|\|)(?:' & $sDrive & ')') = 1 EndFunc ;==>_IsSystemDrive I am no expert at regular expressions, but what I have managed to learn has proved very useful over the last couple of years.
  9. Could anyone please tell me how I get this application to write its information out to a notepad file? Thank you in advance. I had tried changing the code to reference "Untitled - Notepad" instead of the Product 2009 and I would think the send commands and references to buttons and specific pages would need to be removed also. For example I would like to set the $amount to say 100 and then have it write 000-00-0001, 000-00-0002 etc etc until the end of the count into the notepad file. #include <GUIConstants.au3> #include <IE.au3> $me = GUICreate("Desktop Generator", 450, 200) GUISetBkColor(0xFFFFFF) ; background color $textbox1 = GUICtrlCreateEdit("", 10, 90, 430, 100) $Pic1 = GUICtrlCreatePic("image.jpg", 300, 1, 141, 42) $Labelnumberstart = GUICtrlCreateLabel("number Start", 10, 1, 60, 20) $Estart = GUICtrlCreateInput("000-00-", 75, 1, 45, 20) $Eend = (GUICtrlCreateInput("0000", 125, 1, 40, 20)) $LabelAnount = GUICtrlCreateLabel("# ", 10, 25, 60, 20) $amount = GUICtrlCreateInput("000", 75, 25, 30, 20) $newReturn = GUICtrlCreateButton("Create ", 10, 47, 151, 20) $helpButton = GUICtrlCreateButton("Help", 10, 67, 151, 20) fRunGui() Func fRunGui() GUISetState() While 1 $msg = GUIGetMsg() Select Case $msg = $GUI_EVENT_CLOSE ; closes when red x is pressed ExitLoop Case $msg = $newReturn GUICtrlSetData($textbox1, "");deletes the text openRetrun() Case Else ;;; EndSelect WEnd EndFunc ;==>fRunGui Func openRetrun() $iCount = 0 For $count = 0 To GUICtrlRead($amount) - 1 Step 1 $numberEnd = GUICtrlRead($Eend) + $count While StringLen($numberEnd) < 4 $numberEnd = "0" & $numberEnd WEnd $number = GUICtrlRead($Estart) & $numberEnd fThrowError(@ScriptLineNumber, WinActivate("product 2009 :", "")) Send("^n") fThrowError(@ScriptLineNumber, WinWaitActive("Enter number", "", 10)) fThrowError(@ScriptLineNumber, ControlSetText("Enter number", "", "TMaskEdit3", $number)) fThrowError(@ScriptLineNumber, ControlSetText("Enter number", "", "TMaskEdit1", $number)) Send("{TAB}") If (WinExists("Confirm", "&Yes")) Then fThrowError(@ScriptLineNumber, WinActivate("Confirm", "&Yes")) fThrowError(@ScriptLineNumber, ControlClick("Confirm", "", "TButton1", "left", 1)) fThrowError(@ScriptLineNumber, WinWaitActive("Enter number", "", 10)) fThrowError(@ScriptLineNumber, ControlClick("Enter number", "", "TButton3", "left", 1)) GUICtrlSetData($textbox1, "- - - - The return " & $number & " already exists" & @CRLF, 1) Else fThrowError(@ScriptLineNumber, ControlClick("Enter number", "", "TButton4", "left", 1)) fThrowError(@ScriptLineNumber, WinWaitActive("product 2009 :", "pnlNavigation", 10)) Send("!f") Send("c") fThrowError(@ScriptLineNumber, WinWaitActive("product 2009 :", "homepage.htm", 10)) GUICtrlSetData($textbox1, "- - - - The return " & $number & " Created" & @CRLF, 1) $iCount = $iCount + 1 EndIf Next; end of for statement GUICtrlSetData($textbox1, "A total of " & $iCount & " returns were created" & @CRLF, 1) EndFunc ;==>openRetrun Func fThrowError($sMessage, $iZero) If ($iZero = 0) Then MsgBox(1, "Error", "Please restart tool" & $sMessage) fRunGui() Exit EndIf EndFunc ;==>fThrowError Exit
  10. Im relative new to this awesome script language and every day Im mindblowed but what things I discover and didn't know about the au3 syntax but I have some questions : #1. What is ByRef and what it does/why to use it/where to use it #2. Is this really really true that the first character after the $ sign in the variable name means the type of the variable ??? :shocked: ( Like $iVar = int and $sVar = char types from C ? ) What about if I declare $Random instead ? If the above is true, then why all my created programs are working with random names without the correct specific type declared ? Like $pink = 5 + 5 does works despite the 'p' representing the pointer type ! #3. Why I need to unregister things or close any handles like DllClose after a DllOpen OR _GDIPlus_Shutdown() after my script exists ? #4. And last but not the least why this : #include <Misc.au3> ;Global declarations ;... Func () Func() ; the code Endfunc and not this instead : #include <Misc.au3> ;Global declarations ;... ; the code Will there be any problems whatsoever if the last variant ?
×
×
  • Create New...