YoungRacoon Posted April 25, 2008 Share Posted April 25, 2008 (edited) Hi. I would like to save IE bookmarks. Local $SleepPeriod = 2000 $oIE = _IECreate () WinWaitActive("about:blank") Send("!F") ; File menu Sleep ($SleepPeriod) Send("I") ; "Import and Export" item Sleep ($SleepPeriod) Send("!N") ; "Next" button Sleep ($SleepPeriod) Local $listbox = ControlGetHandle("", "", 17011) ; ListBox control Local $listitem = _GUICtrlListBox_SelectString($listbox, "Export Favorites"); Required item is selected successfully. Sleep ($SleepPeriod) Send("!N"); When I click "ALT-N" here, the first item ("Import Favorites") is used, not the item selected earlier ("Export Favorites") What's wrong with my code? Of course, I can use Send ("{Down}") instead of _GUICtrlListBox_SelectString but it's really intresting to work with ListBox directly. Thanks. Edited April 25, 2008 by YoungRacoon Link to comment Share on other sites More sharing options...
YoungRacoon Posted April 25, 2008 Author Share Posted April 25, 2008 Hi. I would like to save IE bookmarks. Local $SleepPeriod = 2000 $oIE = _IECreate () WinWaitActive("about:blank") Send("!F") ; File menu Sleep ($SleepPeriod) Send("I") ; "Import and Export" item Sleep ($SleepPeriod) Send("!N"); "Next" button Sleep ($SleepPeriod) Local $listbox = ControlGetHandle("", "", 17011) ; ListBox control Local $listitem = _GUICtrlListBox_SelectString($listbox, "Export Favorites"); Required item is selected successfully. Sleep ($SleepPeriod) Send("!N"); When I click "ALT-N" here, the first item ("Import Favorites") is used, not the item selected earlier ("Export Favorites") What's wrong with my code? Of course, I can use Send ("{Down}") instead of _GUICtrlListBox_SelectString but it's really intresting to work with ListBox directly. Thanks. Closed. Instead of _GUICtrlListBox_SelectString I used ControlCommand ("","", $id, "SelectString", $string). Instead of Send("!N") I used ControlClick($title, $text, $id) It works. Link to comment Share on other sites More sharing options...
BrettF Posted April 26, 2008 Share Posted April 26, 2008 Closed.Instead of _GUICtrlListBox_SelectString I used ControlCommand ("","", $id, "SelectString", $string).Instead of Send("!N") I used ControlClick($title, $text, $id)It works.From memory GeoSoft was working on something similar. Not sure if it was public though... Maybe wait to see what he says... Vist my blog!UDFs: Opens The Default Mail Client | _LoginBox | Convert Reg to AU3 | BASS.au3 (BASS.dll) (Includes various BASS Libraries) | MultiLang.au3 (Multi-Language GUIs!)Example Scripts: Computer Info Telnet Server | "Secure" HTTP Server (Based on Manadar's Server)Software: AAMP- Advanced AutoIt Media Player | WorldCam | AYTU - Youtube Uploader Tutorials: Learning to Script with AutoIt V3Projects (Hardware + AutoIt): ArduinoUseful Links: AutoIt 1-2-3 | The AutoIt Downloads Section: | SciTE4AutoIt3 Full Version! Link to comment Share on other sites More sharing options...
YoungRacoon Posted April 26, 2008 Author Share Posted April 26, 2008 (edited) From memory GeoSoft was working on something similar. Not sure if it was public though... Maybe wait to see what he says... Anyone kept silence except you. So I decided I'd asked something silly and got to rewrite my code though I'm still eager to know what was wrong with the initial code Edited April 26, 2008 by YoungRacoon 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