zxc3 Posted November 6, 2010 Share Posted November 6, 2010 (edited) What the script needs for to click on "enter" in the address bar of FF only? If you can not use the mouse. Address is already written. Edited November 6, 2010 by zxc3 Link to comment Share on other sites More sharing options...
JohnOne Posted November 6, 2010 Share Posted November 6, 2010 Send("{ENTER}") AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans. Link to comment Share on other sites More sharing options...
zxc3 Posted November 6, 2010 Author Share Posted November 6, 2010 Send("{ENTER}")it does not work because you need somethingControlSend ("untiled","",'^ L ')ControlSend ("untiled","","{ ENTER}")Where is the mistake? Link to comment Share on other sites More sharing options...
JohnOne Posted November 6, 2010 Share Posted November 6, 2010 Send("!d") Send("{ENTER}") AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans. Link to comment Share on other sites More sharing options...
zxc3 Posted November 6, 2010 Author Share Posted November 6, 2010 (edited) Send("!d")Send("{ENTER}")Thanks, but I have already opened a window http://www.bbc.co.uk/, but adress is not pressed- an error, where?AutoItSetOption("WinTitleMatchMode",4)Global $handle#include <FF.au3>$handle = WinGetHandle("BBS - Homepage");WinClose($handle)ControlSend($handle,"!d")ControlSend($handle, "{ENTER}")controlsend -error? Edited November 6, 2010 by zxc3 Link to comment Share on other sites More sharing options...
zxc3 Posted November 6, 2010 Author Share Posted November 6, 2010 Thanks, but I have already opened a window http://www.bbc.co.uk/, but adress is not pressed- an error, where?AutoItSetOption("WinTitleMatchMode",4)Global $handle#include <FF.au3>$handle = WinGetHandle("BBS - Homepage");WinClose($handle)ControlSend($handle,"!d")ControlSend($handle, "{ENTER}")How to properly must be written ControlSend() functions? Link to comment Share on other sites More sharing options...
JohnOne Posted November 6, 2010 Share Posted November 6, 2010 Im sorry, but I just cannot understand you, Im not good with language and its barriers. Controlsend is send to a control, not a window. AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans. Link to comment Share on other sites More sharing options...
Ascend4nt Posted November 7, 2010 Share Posted November 7, 2010 (edited) How about: $hFFWindow=WinGetHandle("[CLASS:MozillaUIWindowClass]") $hFFControl=ControlGetHandle($hFFWindow,"","[CLASS:MozillaWindowClass; INSTANCE:1]") WinActivate($hFFWindow) ControlSend($hFFWindow,"",$hFFControl,'^l') ControlSend($hFFWindow,"",$hFFControl,'{ENTER}') Edited November 7, 2010 by Ascend4nt My contributions: Performance Counters in Windows - Measure CPU, Disk, Network etc Performance | Network Interface Info, Statistics, and Traffic | CPU Multi-Processor Usage w/o Performance Counters | Disk and Device Read/Write Statistics | Atom Table Functions | Process, Thread, & DLL Functions UDFs | Process CPU Usage Trackers | PE File Overlay Extraction | A3X Script Extract | File + Process Imports/Exports Information | Windows Desktop Dimmer Shade | Spotlight + Focus GUI - Highlight and Dim for Eyestrain Relief | CrossHairs (FullScreen) | Rubber-Band Boxes using GUI's (_GUIBox) | GUI Fun! | IE Embedded Control Versioning (use IE9+ and HTML5 in a GUI) | Magnifier (Vista+) Functions UDF | _DLLStructDisplay (Debug!) | _EnumChildWindows (controls etc) | _FileFindEx | _ClipGetHTML | _ClipPutHTML + ClipPutHyperlink | _FileGetShortcutEx | _FilePropertiesDialog | I/O Port Functions | File(s) Drag & Drop | _RunWithReducedPrivileges | _ShellExecuteWithReducedPrivileges | _WinAPI_GetSystemInfo | dotNETGetVersions | Drive(s) Power Status | _WinGetDesktopHandle | _StringParseParameters | Screensaver, Sleep, Desktop Lock Disable | Full-Screen Crash Recovery Wrappers/Modifications of others' contributions: _DOSWildcardsToPCRegEx (original code: RobSaunder's) | WinGetAltTabWinList (original: Authenticity) UDF's added support/programming to: _ExplorerWinGetSelectedItems | MIDIEx UDF (original code: eynstyne) (All personal code/wrappers centrally located at Ascend4nt's AutoIT Code) Link to comment Share on other sites More sharing options...
zxc3 Posted November 7, 2010 Author Share Posted November 7, 2010 How about: $hFFWindow=WinGetHandle("[CLASS:MozillaUIWindowClass]") $hFFControl=ControlGetHandle($hFFWindow,"","[CLASS:MozillaWindowClass; INSTANCE:1]") WinActivate($hFFWindow) ControlSend($hFFWindow,"",$hFFControl,'^l') ControlSend($hFFWindow,"",$hFFControl,'{ENTER}') Thanks a lot, but I do not understand everything. 1.I have already opened page. 2.Then the script is run , it chooses this page with Name and ID. 3.Sends to the address bar of the desired character-"enter" and so on... Link to comment Share on other sites More sharing options...
zxc3 Posted November 7, 2010 Author Share Posted November 7, 2010 (edited) Why do need WinActivate ()? But with it and without it characters are not transmitted in the address bar. Edited November 7, 2010 by zxc3 Link to comment Share on other sites More sharing options...
zxc3 Posted November 7, 2010 Author Share Posted November 7, 2010 Why do need WinActivate ()?But with it and without it characters are not transmitted in the address bar.When I put the cursor at the end of the address, the script works, but added "l" at the end of the address. How to send CTRL L? Link to comment Share on other sites More sharing options...
JohnOne Posted November 7, 2010 Share Posted November 7, 2010 Send("!L") AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans. Link to comment Share on other sites More sharing options...
zxc3 Posted November 7, 2010 Author Share Posted November 7, 2010 Send("!L")it is alt+l , i need ctrl+l,but '^l'for adress bar FF not working Link to comment Share on other sites More sharing options...
Ascend4nt Posted November 7, 2010 Share Posted November 7, 2010 If this is indeed Firefox you are talking about, the code I posted should have worked. However, I'm not certain if keyboard shortcuts are different for your country. You might even have different window classes showing up for Firefox (check with the AutoIt info tool). Also, if your PC is very fast, perhaps you need to change the key delay options. Here's an alternate version: Opt("SendKeyDelay",0) Opt("SendKeyDownDelay",0) $hFFWindow=WinGetHandle("[CLASS:MozillaUIWindowClass]") WinActivate($hFFWindow) ; Window must be active SendKeepActive($hFFWindow) ; This tries to keep all subsequent Send()'s directed at the given window Send('^l') Send("{ENTER}") My contributions: Performance Counters in Windows - Measure CPU, Disk, Network etc Performance | Network Interface Info, Statistics, and Traffic | CPU Multi-Processor Usage w/o Performance Counters | Disk and Device Read/Write Statistics | Atom Table Functions | Process, Thread, & DLL Functions UDFs | Process CPU Usage Trackers | PE File Overlay Extraction | A3X Script Extract | File + Process Imports/Exports Information | Windows Desktop Dimmer Shade | Spotlight + Focus GUI - Highlight and Dim for Eyestrain Relief | CrossHairs (FullScreen) | Rubber-Band Boxes using GUI's (_GUIBox) | GUI Fun! | IE Embedded Control Versioning (use IE9+ and HTML5 in a GUI) | Magnifier (Vista+) Functions UDF | _DLLStructDisplay (Debug!) | _EnumChildWindows (controls etc) | _FileFindEx | _ClipGetHTML | _ClipPutHTML + ClipPutHyperlink | _FileGetShortcutEx | _FilePropertiesDialog | I/O Port Functions | File(s) Drag & Drop | _RunWithReducedPrivileges | _ShellExecuteWithReducedPrivileges | _WinAPI_GetSystemInfo | dotNETGetVersions | Drive(s) Power Status | _WinGetDesktopHandle | _StringParseParameters | Screensaver, Sleep, Desktop Lock Disable | Full-Screen Crash Recovery Wrappers/Modifications of others' contributions: _DOSWildcardsToPCRegEx (original code: RobSaunder's) | WinGetAltTabWinList (original: Authenticity) UDF's added support/programming to: _ExplorerWinGetSelectedItems | MIDIEx UDF (original code: eynstyne) (All personal code/wrappers centrally located at Ascend4nt's AutoIT Code) Link to comment Share on other sites More sharing options...
zxc3 Posted November 8, 2010 Author Share Posted November 8, 2010 (edited) If this is indeed Firefox you are talking about, the code I posted should have worked. However, I'm not certain if keyboard shortcuts are different for your country. You might even have different window classes showing up for Firefox (check with the AutoIt info tool). Also, if your PC is very fast, perhaps you need to change the key delay options. Here's an alternate version: Opt("SendKeyDelay",0) Opt("SendKeyDownDelay",0) $hFFWindow=WinGetHandle("[CLASS:MozillaUIWindowClass]") WinActivate($hFFWindow) ; Window must be active SendKeepActive($hFFWindow) ; This tries to keep all subsequent Send()'s directed at the given window Send('^l') Send("{ENTER}") Still not working, although in manual mode ctrl + L works with any keyboard layout. Can the FF setting affect this? What is different manual input from the input through a script? ControlSend($hFFWindow,"",$hFFControl,"{ASC 012}")-too... Edited November 8, 2010 by zxc3 Link to comment Share on other sites More sharing options...
JohnOne Posted November 8, 2010 Share Posted November 8, 2010 Both "^l", and "!d" do the same for me either manually or with Send(). Is your window visible and active? Why do you use wintitlematchmode 4, and then go on to use a partial title?, try mode 2. AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans. Link to comment Share on other sites More sharing options...
taietel Posted November 8, 2010 Share Posted November 8, 2010 zxc3, in your post #5 try to change $handle = WinGetHandle("BBS - Homepage") with $handle = WinGetHandle("BBC - Homepage"). Things you should know first...In the beginning there was only ONE! And zero... Progs: Create PDF(TXT2PDF,IMG2PDF) 3D Bar Graph DeskGadget Menu INI Photo Mosaic 3D Text Link to comment Share on other sites More sharing options...
GMK Posted November 8, 2010 Share Posted November 8, 2010 This might all be easier if you tried using the Link to comment Share on other sites More sharing options...
zxc3 Posted November 9, 2010 Author Share Posted November 9, 2010 Both "^l", and "!d" do the same for me either manually or with Send().In manual mode, alt+d on the English keyboard layout switches to the address bar, and the Russian switches on the menu - View. But in the script, I can not transmit any control character in the address bar of FF.Is your window visible and active?YesWhy do you use wintitlematchmode 4, and then go on to use a partial title?, try mode 2.it is changes nothing Link to comment Share on other sites More sharing options...
zxc3 Posted November 9, 2010 Author Share Posted November 9, 2010 zxc3, in your post #5 try to change $handle = WinGetHandle("BBS - Homepage") with $handle = WinGetHandle("BBC - Homepage"). thanks, but I did not understand 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