Starstar Posted November 8, 2013 Share Posted November 8, 2013 (edited) when i run the script first time script pause with any cause. But when i run it again script complete successfully....i couldn't understand. Why? #Include <WinAPIEx.au3> If @OSVersion ="WIN_VISTA" Or @OSVersion = "WIN_7" Or @OSVersion = "WIN_8" Then _WinAPI_GetConnectedDlg(1,1+4+2) WinWait("Connect to the Internet") Sleep(100) WinClose("Connect to the Internet") Else MsgBox(0,"Version Eror","Your windows version does not match. it is only for win 7 WIN_8 and vista"& @CRLF &"your windows version is "& @OSVersion) Exit EndIf ;i tried it in WIN_7 and win_8 i tried it in WIN_7 . Edited November 11, 2013 by adnanbaloch Life is like a coin. You can spend it Anyway as you wish and for your kind information. "you can spend it only once." Link to comment Share on other sites More sharing options...
BrewManNH Posted November 8, 2013 Share Posted November 8, 2013 The _WinAPI_GetConnectedDlg function opens the window, but then it doesn't return from that function until the window is closed, so WinWait can't find the window as it's not there any more. I can't explain why it works a second time unless in Windows 7 it allows you to open two sessions of that dialog at the same time. If I posted any code, assume that code was written using the latest release version unless stated otherwise. Also, if it doesn't work on XP I can't help with that because I don't have access to XP, and I'm not going to.Give a programmer the correct code and he can do his work for a day. Teach a programmer to debug and he can do his work for a lifetime - by Chirag GudeHow to ask questions the smart way! I hereby grant any person the right to use any code I post, that I am the original author of, on the autoitscript.com forums, unless I've specifically stated otherwise in the code or the thread post. If you do use my code all I ask, as a courtesy, is to make note of where you got it from. Back up and restore Windows user files _Array.au3 - Modified array functions that include support for 2D arrays. - ColorChooser - An add-on for SciTE that pops up a color dialog so you can select and paste a color code into a script. - Customizable Splashscreen GUI w/Progress Bar - Create a custom "splash screen" GUI with a progress bar and custom label. - _FileGetProperty - Retrieve the properties of a file - SciTE Toolbar - A toolbar demo for use with the SciTE editor - GUIRegisterMsg demo - Demo script to show how to use the Windows messages to interact with controls and your GUI. - Latin Square password generator Link to comment Share on other sites More sharing options...
Starstar Posted November 8, 2013 Author Share Posted November 8, 2013 Thanks BrewManNH But when i use winwait with time like this. WinWait("Connect to the Internet","",3) Script does also stop. Life is like a coin. You can spend it Anyway as you wish and for your kind information. "you can spend it only once." Link to comment Share on other sites More sharing options...
BrewManNH Posted November 8, 2013 Share Posted November 8, 2013 It doesn't for stop for me, except for the 3 seconds pause. You did close the dialog window correct? If I posted any code, assume that code was written using the latest release version unless stated otherwise. Also, if it doesn't work on XP I can't help with that because I don't have access to XP, and I'm not going to.Give a programmer the correct code and he can do his work for a day. Teach a programmer to debug and he can do his work for a lifetime - by Chirag GudeHow to ask questions the smart way! I hereby grant any person the right to use any code I post, that I am the original author of, on the autoitscript.com forums, unless I've specifically stated otherwise in the code or the thread post. If you do use my code all I ask, as a courtesy, is to make note of where you got it from. Back up and restore Windows user files _Array.au3 - Modified array functions that include support for 2D arrays. - ColorChooser - An add-on for SciTE that pops up a color dialog so you can select and paste a color code into a script. - Customizable Splashscreen GUI w/Progress Bar - Create a custom "splash screen" GUI with a progress bar and custom label. - _FileGetProperty - Retrieve the properties of a file - SciTE Toolbar - A toolbar demo for use with the SciTE editor - GUIRegisterMsg demo - Demo script to show how to use the Windows messages to interact with controls and your GUI. - Latin Square password generator Link to comment Share on other sites More sharing options...
Starstar Posted November 9, 2013 Author Share Posted November 9, 2013 But i couldnot.... Life is like a coin. You can spend it Anyway as you wish and for your kind information. "you can spend it only once." Link to comment Share on other sites More sharing options...
Starstar Posted November 9, 2013 Author Share Posted November 9, 2013 It doesn't for stop for me, except for the 3 seconds pause. You did close the dialog window correct? in which windows you tested it. Life is like a coin. You can spend it Anyway as you wish and for your kind information. "you can spend it only once." Link to comment Share on other sites More sharing options...
BrewManNH Posted November 9, 2013 Share Posted November 9, 2013 (edited) Windows 7 and Vista, both worked fine. Except as noted that the WinWait doesn't get activated until the window closes. So, even though it doesn't work for you, it shouldn't matter because whatever you WANTED to do with the window you can't do it. As soon as you invoke that function, it will block the script until the dialog has been closed, so any actions that require that window to be there won't work. Whatever you need to do with the window can probably be done from the command line or through WMI. Edited November 9, 2013 by BrewManNH If I posted any code, assume that code was written using the latest release version unless stated otherwise. Also, if it doesn't work on XP I can't help with that because I don't have access to XP, and I'm not going to.Give a programmer the correct code and he can do his work for a day. Teach a programmer to debug and he can do his work for a lifetime - by Chirag GudeHow to ask questions the smart way! I hereby grant any person the right to use any code I post, that I am the original author of, on the autoitscript.com forums, unless I've specifically stated otherwise in the code or the thread post. If you do use my code all I ask, as a courtesy, is to make note of where you got it from. Back up and restore Windows user files _Array.au3 - Modified array functions that include support for 2D arrays. - ColorChooser - An add-on for SciTE that pops up a color dialog so you can select and paste a color code into a script. - Customizable Splashscreen GUI w/Progress Bar - Create a custom "splash screen" GUI with a progress bar and custom label. - _FileGetProperty - Retrieve the properties of a file - SciTE Toolbar - A toolbar demo for use with the SciTE editor - GUIRegisterMsg demo - Demo script to show how to use the Windows messages to interact with controls and your GUI. - Latin Square password generator Link to comment Share on other sites More sharing options...
Starstar Posted November 9, 2013 Author Share Posted November 9, 2013 (edited) Thanks i want to open Broadband (PPPoE) from this window. Edited November 9, 2013 by adnanbaloch Life is like a coin. You can spend it Anyway as you wish and for your kind information. "you can spend it only once." Link to comment Share on other sites More sharing options...
Starstar Posted November 11, 2013 Author Share Posted November 11, 2013 (edited) Test this code and post result please. i think it is a bug. It works only second time not first time. #Include <WinAPIEx.au3> If @OSVersion ="WIN_VISTA" Or @OSVersion = "WIN_7" Or @OSVersion = "WIN_8" Then _WinAPI_GetConnectedDlg(1,1+4+2) WinWait("Connect to the Internet") Sleep(100) WinClose("Connect to the Internet") Else MsgBox(0,"Version Eror","Your windows version does not match. it is only for win 7 WIN_8 and vista"& @CRLF &"your windows version is "& @OSVersion) Exit EndIf ;i tried it in WIN_7 and win_8 Edited November 11, 2013 by adnanbaloch Life is like a coin. You can spend it Anyway as you wish and for your kind information. "you can spend it only once." Link to comment Share on other sites More sharing options...
guinness Posted November 11, 2013 Share Posted November 11, 2013 (edited) You have misunderstood the purpose of this section. This is to test the Forum, NOT your code. Edit: It appears the post was moved to General Help & Support. Edited November 11, 2013 by guinness UDF List: _AdapterConnections() • _AlwaysRun() • _AppMon() • _AppMonEx() • _ArrayFilter/_ArrayReduce • _BinaryBin() • _CheckMsgBox() • _CmdLineRaw() • _ContextMenu() • _ConvertLHWebColor()/_ConvertSHWebColor() • _DesktopDimensions() • _DisplayPassword() • _DotNet_Load()/_DotNet_Unload() • _Fibonacci() • _FileCompare() • _FileCompareContents() • _FileNameByHandle() • _FilePrefix/SRE() • _FindInFile() • _GetBackgroundColor()/_SetBackgroundColor() • _GetConrolID() • _GetCtrlClass() • _GetDirectoryFormat() • _GetDriveMediaType() • _GetFilename()/_GetFilenameExt() • _GetHardwareID() • _GetIP() • _GetIP_Country() • _GetOSLanguage() • _GetSavedSource() • _GetStringSize() • _GetSystemPaths() • _GetURLImage() • _GIFImage() • _GoogleWeather() • _GUICtrlCreateGroup() • _GUICtrlListBox_CreateArray() • _GUICtrlListView_CreateArray() • _GUICtrlListView_SaveCSV() • _GUICtrlListView_SaveHTML() • _GUICtrlListView_SaveTxt() • _GUICtrlListView_SaveXML() • _GUICtrlMenu_Recent() • _GUICtrlMenu_SetItemImage() • _GUICtrlTreeView_CreateArray() • _GUIDisable() • _GUIImageList_SetIconFromHandle() • _GUIRegisterMsg() • _GUISetIcon() • _Icon_Clear()/_Icon_Set() • _IdleTime() • _InetGet() • _InetGetGUI() • _InetGetProgress() • _IPDetails() • _IsFileOlder() • _IsGUID() • _IsHex() • _IsPalindrome() • _IsRegKey() • _IsStringRegExp() • _IsSystemDrive() • _IsUPX() • _IsValidType() • _IsWebColor() • _Language() • _Log() • _MicrosoftInternetConnectivity() • _MSDNDataType() • _PathFull/GetRelative/Split() • _PathSplitEx() • _PrintFromArray() • _ProgressSetMarquee() • _ReDim() • _RockPaperScissors()/_RockPaperScissorsLizardSpock() • _ScrollingCredits • _SelfDelete() • _SelfRename() • _SelfUpdate() • _SendTo() • _ShellAll() • _ShellFile() • _ShellFolder() • _SingletonHWID() • _SingletonPID() • _Startup() • _StringCompact() • _StringIsValid() • _StringRegExpMetaCharacters() • _StringReplaceWholeWord() • _StringStripChars() • _Temperature() • _TrialPeriod() • _UKToUSDate()/_USToUKDate() • _WinAPI_Create_CTL_CODE() • _WinAPI_CreateGUID() • _WMIDateStringToDate()/_DateToWMIDateString() • Au3 script parsing • AutoIt Search • AutoIt3 Portable • AutoIt3WrapperToPragma • AutoItWinGetTitle()/AutoItWinSetTitle() • Coding • DirToHTML5 • FileInstallr • FileReadLastChars() • GeoIP database • GUI - Only Close Button • GUI Examples • GUICtrlDeleteImage() • GUICtrlGetBkColor() • GUICtrlGetStyle() • GUIEvents • GUIGetBkColor() • Int_Parse() & Int_TryParse() • IsISBN() • LockFile() • Mapping CtrlIDs • OOP in AutoIt • ParseHeadersToSciTE() • PasswordValid • PasteBin • Posts Per Day • PreExpand • Protect Globals • Queue() • Resource Update • ResourcesEx • SciTE Jump • Settings INI • SHELLHOOK • Shunting-Yard • Signature Creator • Stack() • Stopwatch() • StringAddLF()/StringStripLF() • StringEOLToCRLF() • VSCROLL • WM_COPYDATA • More Examples... Updated: 22/04/2018 Link to comment Share on other sites More sharing options...
Starstar Posted November 11, 2013 Author Share Posted November 11, 2013 ok sorry.......... Life is like a coin. You can spend it Anyway as you wish and for your kind information. "you can spend it only once." Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted November 11, 2013 Moderators Share Posted November 11, 2013 adnanbaloch,Thread moved. M23 Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area Link to comment Share on other sites More sharing options...
Starstar Posted November 11, 2013 Author Share Posted November 11, 2013 ok and thanks Life is like a coin. You can spend it Anyway as you wish and for your kind information. "you can spend it only once." Link to comment Share on other sites More sharing options...
Developers Jos Posted November 11, 2013 Developers Share Posted November 11, 2013 (edited) Test this code and post result please. i think it is a bug. It works only second time not first time. Add this at the top of your script Opt("TrayIconDebug", 1) and you will see that your script is blocking on a DLLCALL() and your WinWait() doesn't get processed. My guess is that you close the Dialog manually which means your first script will hang on the WinWait() and will close the Dialog when started with the second time you run the script. Jos Edited November 11, 2013 by Jos SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
BrewManNH Posted November 11, 2013 Share Posted November 11, 2013 How is this different from your last thread on the subject? Why repost it in a new thread? '?do=embed' frameborder='0' data-embedContent>> If I posted any code, assume that code was written using the latest release version unless stated otherwise. Also, if it doesn't work on XP I can't help with that because I don't have access to XP, and I'm not going to.Give a programmer the correct code and he can do his work for a day. Teach a programmer to debug and he can do his work for a lifetime - by Chirag GudeHow to ask questions the smart way! I hereby grant any person the right to use any code I post, that I am the original author of, on the autoitscript.com forums, unless I've specifically stated otherwise in the code or the thread post. If you do use my code all I ask, as a courtesy, is to make note of where you got it from. Back up and restore Windows user files _Array.au3 - Modified array functions that include support for 2D arrays. - ColorChooser - An add-on for SciTE that pops up a color dialog so you can select and paste a color code into a script. - Customizable Splashscreen GUI w/Progress Bar - Create a custom "splash screen" GUI with a progress bar and custom label. - _FileGetProperty - Retrieve the properties of a file - SciTE Toolbar - A toolbar demo for use with the SciTE editor - GUIRegisterMsg demo - Demo script to show how to use the Windows messages to interact with controls and your GUI. - Latin Square password generator Link to comment Share on other sites More sharing options...
Developers Jos Posted November 11, 2013 Developers Share Posted November 11, 2013 (edited) @adnanbaloch: Please stop wasting our time and stick to one thread and assume the problem is the driver not the car. You were even given the same answer. Topics merged. Jos Edited November 11, 2013 by Jos SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
Starstar Posted November 11, 2013 Author Share Posted November 11, 2013 sorry sorry please forgive me .i posted my code in Test posting modrator Move it in Gernal help. where i allready discused this..........My appolgies i know i am wrong and distrub you all. Life is like a coin. You can spend it Anyway as you wish and for your kind information. "you can spend it only once." Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now