Jump to content

Search the Community

Showing results for tags 'close'.



More search options

  • 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
  • AutoIt

Calendars

  • Community Calendar

Found 13 results

  1. Hello I got problem with final program .exe closing on windows 7 ultimate 64bit. It starts , icon shows on toolbar and program exit. I have seen things like that before but it was caused by AV. There is no AV and UAC and firewall off. Maybe is there needed any microsoft library or etc or whatever?
  2. For fun, I'm building an app that opens a webpage and refreshes it every 30 seconds. But once the script performs _IEAction($oIE, "refresh"), the GUI closes. Any help is appreciated. #include <ButtonConstants.au3> #include <EditConstants.au3> #include <GUIConstantsEx.au3> #include <StaticConstants.au3> #include <WindowsConstants.au3> #include <WinAPIFiles.au3> #include <Array.au3> #include <File.au3> #include <Excel.au3> #include <DateTimeConstants.au3> #include <MsgBoxConstants.au3> #include <WinAPIShellEx.au3> #include <MsgBoxConstants.au3> #include <Date.au3> #include <ComboConstants.au3> #include <guimenu.au3> #include <IE.au3> HotKeySet("{F4}", "_Exit") ;Open the file(s) in the selected folder $extension = ".txt" $app2openWith = @SystemDir & "\notepad.exe" Func Begin() Global $loopTrick = 0 #Region ### START Koda GUI section ### Form=c:\users\mchu\downloads\autoit\my code\form1.kxf Global $UI = GUICreate("Hit Em Up!", 256, 113, -1, -1) GUISetBkColor(0x000000) $menu = _GUICtrlMenu_GetSystemMenu($UI) _GUICtrlMenu_EnableMenuItem($menu, $SC_CLOSE, 1, False) Global $url = GUICtrlCreateInput("https://www.youtube.com/watch?v=dQw4w9WgXcQ", 81, 8, 160, 21) $Label1 = GUICtrlCreateLabel("Target:", 16, 8, 55, 17) GUICtrlSetFont(-1, 12, 800, 0, "MS Sans Serif") GUICtrlSetColor(-1, 0x00FF00) Global $StartBut = GUICtrlCreateButton("Start", 16, 40, 67, 25) GUICtrlSetFont(-1, 13, 800, 0, "MS Sans Serif") GUICtrlSetBkColor(-1, 0x008000) $Label2 = GUICtrlCreateLabel("(Press F4 to Exit)", 96, 40, 8000, 17) GUICtrlSetFont(-1, 12, 800, 0, "MS Sans Serif") GUICtrlSetColor(-1, 0x00FF00) GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ### While 1 $UIfunc = GUIGetMsg() Select Case $UIfunc = $GUI_EVENT_CLOSE _Exit() Case $UIfunc = $StartBut If GUICtrlRead($url) = "" Then MsgBox(48, "Um...", "Give me a target you idiot.") Else GUICtrlSetState($url, $GUI_DISABLE) GUICtrlSetState($StartBut, $GUI_DISABLE) Start() EndIf EndSelect WEnd EndFunc ;==>Begin Func Start() If $loopTrick = 0 Then Global $oIE = _IECreate(GUICtrlRead($url)) _IELoadWait($oIE) Again() ElseIf $loopTrick = 1 Then Sleep(3000) _IEAction($oIE, "refresh") Sleep(3000) Start() EndIf EndFunc ;==>Start Func Again() $loopTrick = 1 Start() EndFunc ;==>Again Func _Exit() Exit EndFunc ;==>_Exit
  3. Hi all, Anyone have any idea how to close all open tabs except a specific one I manually open. Assuming I don't know what is open in all the tabs except just the one I want to keep open. I didn't want to use sendkeys and I was trying to use the following code to list the title (or url) of the 3 open tabs and after I got that part working I would just close the other 2. This sample only displays the title of the first open tab #include <IE.au3> Const $ie_new_in_tab = 0x0800 $oIE = _IECreate("https://www.autoitscript.com") __IENavigate($oIE, "https://www.autoitscript.com/forum/", 1, $ie_new_in_tab) ;(obj,url,wait,param) __IENavigate($oIE, "https://www.google.com/", 1, $ie_new_in_tab) ;(obj,url,wait,param) Local $aIE[1] $aIE[0] = 0 Local $i = 1, $oIE While 1     $oIE = _IEAttach("", "instance", $i)     If @error = $_IEStatus_NoMatch Then ExitLoop     ConsoleWrite(_IEPropertyGet($oIE, "title") & @CRLF)     ReDim $aIE[$i + 1]     $aIE[$i] = $oIE ;each item holds object     $aIE[0] = $i ;first item holds count     $i += 1 WEnd MsgBox($MB_SYSTEMMODAL, "Browsers Found", "Number of browser instances in the array: " & $aIE[0]) ; This doesn't return the list of tabs in the console just the first tab Thanks for any and all help
  4. Good morning guys I was trying to not open another post, writing here my little issue, but seems that no one cares about, and so, I'm opening another post What I'm trying to do, is detect the event close sent from the virtual keyboard. Why? Because, I have an application which, when I set the focus on a textbox, if the virtual keyboard does not exist, then it is created, else, it's not created But, everytime I try to close the virtual keyboard, the focus remains on the textbox, and another $EN_FOCUS event it's launched and detected from my WM_COMMAND, and so, the virtual keyboard is opened again. How can I solve this little "issue"? I was trying to detect the event sent from the virtual keyboard, storing the handle of it in a variable, and setting: GUISetOnEvent($GUI_EVENT_CLOSE, "CloseVK", $hVirtualKeyboard) without any result. Can someone please help me? Thanks EDIT: Here I'd like to see @Melba23, @water, @Danyfirex...
  5. Hey everyone i wanna close a process by path like C:\Users\salah\AppData\Local\Temp\a.exe processclose(C:\Users\salah\AppData\Local\Temp\a.exe) i tried to split the path but i don't know how to know last loop and thanks
  6. When creating an mdi child using _WinApi_SetParent the close event for the parent is not run until the child window is closed. Is there any way to close the child windows when the parent's close button is pressed? It seems that when you close from the task bar the parent close function is run first. #include <WinAPI.au3> #include <GUIConstants.au3> Opt("GUIOnEventMode", 1) Global $hParent = GUICreate("Parent", 800, 600) Global $hChild = GUICreate("Child", 300, 200, 0, 0) _WinAPI_SetParent($hChild, $hParent) GUISetState(@SW_SHOW, $hParent) GUISetState(@SW_SHOW, $hChild) GUISetOnEvent($GUI_EVENT_CLOSE, CloseWinParent, $hParent) GUISetOnEvent($GUI_EVENT_CLOSE, CloseWinChild, $hChild) While (True) Sleep(100) WEnd Func CloseWinParent() ConsoleWrite("CloseWinParent" & @LF) GUIDelete($hParent) Exit 0 EndFunc Func CloseWinChild() ConsoleWrite("CloseWinChild" & @LF) GUIDelete($hChild) EndFunc Also, looking at the help file This is wrong. I've used _WinApi_SetParent in the past to set autoit created programs to the child of other programs. Perhaps it was like this in the past but Windows 7 and greater different applications can be child and parent.
  7. Hello, First off, I want to say that I very much appreciate the hard work that people put in to replying on these forums and helping newbs. I've gotten 99% of my answers through google, forum searches, and documentation. Okay, so. I'm actually sure this has been asked before, but I wasn't able to find anything and I'm having some difficulty. I want to delete tabs in a control with a middle click (or specifically, detect when a tab has been middle-clicked). Initially I was going to try to use GUIGetCursorInfo along with checking for a middle-click, the problem is, when the cursor is over a tab, it simply returns the ID of the whole control (I'm using the native tab functionality). If I can avoid it, I REALLY don't want to manually check coordinates of tabs when the middle mouse is clicked, as tabs are going to be generated dynamically (anywhere from one to infinity tabs if the user lets things get out of hand), and the window I'm using will be resizable (thus having to run checks if a tab is out of view, etc), but I can if I have no other choice. So basically, Is there either 1: a simple native/UDF way to detect middle-click on tabs, 2: a way to get GUIGetCursorInfo give the control ID of the tab itself instead of the control, or 3: something I haven't thought of all together? Thanks in advance!
  8. Hi All, How to quit or exit autoit script .exe file. I have created one script using autoit script finally we converted .exe file. but while executing script , how to close or eixt or quit entire .exe file , if havning any function , please inform me. Thanks, Sat6804
  9. Close Usb popup

    How do I close a usb pop up window with auto it. If one plugs in a usb a pop up window appears like "would you like to check and repait the device..." The window has a window class of #32770, since I have to open permanently another window with that same class, I cannot WinClose("[#32770]"). Is it possible to close the window with it's Basic Control Info Class? In this case it would be 'DirectUIHWND'
  10. Dear AutoIt Community, I need some clarification as to why GUI does not work as planned. This is the snippet of code that's troubling me: Else GUICreate("Path", 320, 120, @DesktopWidth / 2 - 160, @DesktopHeight / 2 - 45, -1, $WS_EX_ACCEPTFILES) Local $idFile = GUICtrlCreateInput("", 10, 5, 300, 20) GUICtrlSetState(-1, $GUI_DROPACCEPTED) Local $idPath = GUICtrlRead($idFile) GUICtrlCreateLabel("Type path of .exe or drag file into InputBox", 10, 35) Local $idBtn = GUICtrlCreateButton("OK", 160 - 30, 75, 60, 20) GUISetState(@SW_SHOW) ; Loop until the user exits. While 1 Switch GUIGetMsg() Case $GUI_EVENT_CLOSE ExitLoop Case $idBtn ExitLoop EndSwitch WEnd Run($idPath) ProcessWait("Patcher.exe") WinWait("Patcher") WinWaitActive("Patcher") If Not WinActive("Patcher") Then WinActivate("atcher") EndIf EndIfMy problem here is that when I want to exit the created GUI or press the button $idBtn, it won't exit. However, when I execute the following snippet by itself, it works. GUICreate("Path", 320, 120, @DesktopWidth / 2 - 160, @DesktopHeight / 2 - 45, -1, $WS_EX_ACCEPTFILES) Local $idFile = GUICtrlCreateInput("", 10, 5, 300, 20) GUICtrlSetState(-1, $GUI_DROPACCEPTED) Local $idPath = GUICtrlRead($idFile) GUICtrlCreateLabel("Type path of .exe or drag file into InputBox", 10, 35) Local $idBtn = GUICtrlCreateButton("OK", 160 - 30, 75, 60, 20) GUISetState(@SW_SHOW) ; Loop until the user exits. While 1 Switch GUIGetMsg() Case $GUI_EVENT_CLOSE ExitLoop Case $idBtn ExitLoop EndSwitch WEndI don't know what to do. Mny Thanks in advance, ~Medallyon
  11. Hi everyone, Does anyone know why the ESC button doesn't close my form in the second loop? #include <GUIConstantsEx.au3> GUICreate('test', 600, 400, -1, -1) $BTN = GUICtrlCreateButton("Press", 10, 10, 80, 30) GUISetState(@SW_SHOW) While True Switch GUIGetMsg() Case $GUI_EVENT_CLOSE Exit Case $BTN ExitLoop EndSwitch WEnd ConsoleWrite("Second Loop" & @CRLF) GUICtrlDelete($BTN) While True Switch GUIGetMsg() Case $GUI_EVENT_CLOSE ;just hear the 'ding' sound if i press ESC... Exit EndSwitch WEnd Regards TheAutomator.
  12. I have spent the past couple of days searching for the answer to this question, and I have not found one that really works. What I am trying to do, is have the following code always run and when ever notepad is open and idle for more then 2 seconds close it. It works but only when their is one instance of Notepad, if there are more then one it does not close all of them at the same time. Can someone help me, using this code, to have all windows with the title Notepad close? #include <Timers.au3> ;Declare the Timer: ; Global $TIMER = TimerInit() Opt("TrayOnEventMode",1) Opt("TrayMenuMode",1) HotKeySet("#{F4}", "_exit") ; Ctrl-Shift-Alt-X to exit While 1 ;If this application is active then reset the timer: If WinExists("Notepad") And _Timer_GetIdleTime() >= 2 * 1000 Then MsgBox (0, "Time reached", "You have been idle for more than 2 seconds.") WinClose("Notepad") EndIf ;Sleep for 1 seconds before looping again: ; Sleep(1000) WEnd Func _exit() Exit EndFunc Thanks Grimm
  13. hello, i made a script to show a traytip every "10 SECs" and timeout is "2 SECs", but i don't know why it doesn't hide after 2 SECs or even 1000 sec,, i must click on it to hide check the script: While 1 $start = TimerInit() Sleep(10000) $End = TimerDiff($start) $rEND = Round($End / 1000, 0) If $rEND = "10" Then $x = TrayTip("test", "testtt", 2) Sleep(2000) EndIf WEndany help would be appreciated thanks.
×