bumitrue93 Posted December 1, 2011 Posted December 1, 2011 (edited) Hello all..I have made a GUI that has two separate window..i have been facing some problems..1) When i enter something in the search menu (google) on both the windows and then when i click on window 1 and press backspace.. it doesn't deletes the text in it.. rather the text in window 2 gets deleted2) when i load a page in any window.. the other page loads itself( that's what i think since both the page turns white)3) i want to make a loading bar to know if its really loading or not.4) you might notice that i made the window popup style as i don't want the user to move the window around... is there a way that i can do it.. using normal window style?5) Also i want to add an address bar instead of those buttons.expandcollapse popup#include <GUIConstantsEx.au3> #include <IE.au3> #Include <GuiButton.au3> #include <WindowsConstants.au3> Global $oIE1 = _IECreateEmbedded() Global $oIE2 = _IECreateEmbedded() Global $button_home, $button_exit, $button_enter_address1, $button_enter_address2 Global $url1 = "http://google.com" Global $url2 = "http://google.com" HotKeySet("!{F4}", "end") start() Func start() GUICreate("Custom Client", @DesktopWidth, @DesktopHeight-30, 0, 0, $WS_POPUP) Opt("GUIOnEventMode", 1) $client_window_chat = GUICtrlCreateObj($oIE1, 10, 35, (@DesktopWidth/2) -10, 700) $client_window_main = GUICtrlCreateObj($oIE2, (@DesktopWidth/2) +10, 35, (@DesktopWidth/2)-20, 700) $button_exit = GUICtrlCreateButton("Exit", @DesktopWidth- 70, 2, 70, 30) $button_enter_address1 = GUICtrlCreateButton("Enter Address", 10, 2, 100, 30) $button_enter_address2 = GUICtrlCreateButton("Enter Address", (@DesktopWidth/2) +10, 2, 100, 30) $label_force_close = GUICtrlCreateLabel("Press Alt + F4 to Force Close.", @DesktopWidth - 250, 10) $label_window1 = GUICtrlCreateLabel("window 1", (@DesktopWidth/2)/2, 10) $label_window2 = GUICtrlCreateLabel("window 2", (@DesktopWidth/2)+(@DesktopWidth/2)/2, 10) GUISetState(@SW_SHOW) $oIE1.navigate($url1) $oIE2.navigate($url2) GUICtrlSetOnEvent($button_exit, "end") GUICtrlSetOnEvent($button_home, "button_home") GUICtrlSetOnEvent($button_enter_address1, "button_enter_address1") GUICtrlSetOnEvent($button_enter_address2, "button_enter_address2") While 1 WEnd GUIDelete() EndFunc Func button_home() $oIE1.navigate("http://www.google.com") EndFunc Func button_enter_address1() $url1 = InputBox ( "", "Enter The Address", "" , "" , 500, 200) If Not $url1 = "" Then $oIE1.navigate($url1) EndIf EndFunc Func button_enter_address2() $url2 = InputBox ( "", "Enter The Address", "" , "" , 500, 200) If Not $url2 = "" Then $oIE2.navigate($url2) EndIf EndFunc Func end() Exit EndFunc Edited December 1, 2011 by bumitrue93
Moderators Melba23 Posted December 1, 2011 Moderators Posted December 1, 2011 bumitrue93,I am afraid I cannot help with the IE questions - but I can with the "immoveable GUI" part. You need to intercept the SC_MOVE message like this:#include <GUIConstantsEx.au3> #include <WindowsConstants.au3> $hGui = GUICreate("") GUISetState() GUIRegisterMsg($WM_SYSCOMMAND, "On_WM_SYSCOMMAND") While GUIGetMsg() <> $GUI_EVENT_CLOSE WEnd Func On_WM_SYSCOMMAND($hWnd, $Msg, $wParam, $lParam) If BitAND($wParam, 0xFFF0) = 0xF010 Then Return False ; $SC_MOVE Return $GUI_RUNDEFMSG EndFuncIf you are not too familar with GUIRegisterMsg I recommend the GUIRegisterMsg tutorial in the Wiki. M23 bumitrue93 1 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
bumitrue93 Posted December 1, 2011 Author Posted December 1, 2011 #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> $hGui = GUICreate("") GUISetState() GUIRegisterMsg($WM_SYSCOMMAND, "On_WM_SYSCOMMAND") While GUIGetMsg() <> $GUI_EVENT_CLOSE WEnd Func On_WM_SYSCOMMAND($hWnd, $Msg, $wParam, $lParam) If BitAND($wParam, 0xFFF0) = 0xF010 Then Return False ; $SC_MOVE Return $GUI_RUNDEFMSG EndFunc If you are not too familar with GUIRegisterMsg I recommend the GUIRegisterMsg tutorial in the Wiki. M23 Thanks u so much That really helped a lot ^^
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