
LucasM
Active Members-
Posts
35 -
Joined
-
Last visited
LucasM's Achievements

Seeker (1/7)
0
Reputation
-
Help Creating hotkeys definition table.
LucasM replied to LucasM's topic in AutoIt General Help and Support
I`ve read somewhere the use of _ClipBoard_SetData or _ClipBoard_GetData ... including them in a clipboard.au3 But honestly, its the same i`ve being doing so far without using that function. I need something to set the different meaning of the hotkeys in every function beggining. ????? any ideas ? -
Help Creating hotkeys definition table.
LucasM replied to LucasM's topic in AutoIt General Help and Support
I gues what im trying to do is replace on hotkey function with another depending on thaf file existance. -
Help Creating hotkeys definition table.
LucasM replied to LucasM's topic in AutoIt General Help and Support
This is the exact same code for 2 different languages.. If you notice in the beggining of each code,.. the hotkeys... Send("!h") and Send("!u") changes so they fit the different language... making the exact same thing If FileExists("C:\Program Files\Internet Explorer\ 9es-ESes_ES.txt")Then Sleep(2000) Send("!h") Sleep(2000) Send("o") Sleep(2000) SplashTextOn("Beginning IE8 Tests", "Setting IE8 for the Tests...: Waiting Internet Options", 300, 100, -1, 0, 4) WinWait("Opciones de Internet") SplashTextOn("Beginning IE8 Tests", "Setting IE8 for the Tests...: Found Internet Options", 300, 100, -1, 0, 4) Sleep(1000) Send("!u") Sleep(1000) Send("{TAB 15}") sleep(3000) Send("{ENTER}") Sleep(2000) Send("{TAB 15}") Sleep(3000) Send("{RIGHT 2}") sleep(1000) Send("{TAB 1}") sleep(1000) Send("{UP 3}") Sleep(1000) Send("{TAB 7}") Sleep(2000) Send("{ENTER}") Sleep(1000) WinWait("Configuración del bloqueador de elementos emergentes") Send("{TAB 3}") Sleep(3000) Send("{UP 2}") Sleep(1000) ControlCommand("Configuración del bloqueador de elementos emergentes", "Mostrar la barra de notificación cuando se bloquee un elemento emergente.", 5417, "UnCheck") Sleep(2000) Send("{ESC}") Sleep(2000) Send("{TAB 2}") Sleep(2000) Send("{ENTER}") Sleep(2000) Else Sleep(2000) Send("!t") Sleep(2000) Send("o") Sleep(2000) SplashTextOn("Beginning IE8 Tests", "Setting IE8 for the Tests...: Waiting Internet Options", 300, 100, -1, 0, 4) WinWait("Internet Options") SplashTextOn("Beginning IE8 Tests", "Setting IE8 for the Tests...: Found Internet Options", 300, 100, -1, 0, 4) Sleep(1000) Send("!c") Sleep(1000) Send("{TAB 15}") sleep(3000) Send("{ENTER}") Sleep(2000) Send("{TAB 15}") Sleep(3000) Send("{RIGHT 2}") sleep(1000) Send("{TAB 1}") sleep(1000) Send("{UP 3}") Sleep(1000) Send("{TAB 7}") Sleep(2000) Send("{ENTER}") Sleep(1000) WinWait("Pop-up Blocker Settings") Send("{TAB 6}") Sleep(3000) Send("{UP 2}") Sleep(1000) ControlCommand("Pop-up Blocker Settings", "Show Notification Bar when a pop-up is blocked.", 5417, "UnCheck") Sleep(2000) Send("{TAB 5}") Sleep(2000) Send("{ENTER}") Sleep(2000) Send("{DOWN 3}") Sleep(3000) Send("{ENTER}") Sleep(7000) EndIf now, I`ve tried posting If fileexists then hotkeys("!t","h") trying to replace "!t" for the second one.. but nothing happened. i guess im not getting how this function works. -
Help Creating hotkeys definition table.
LucasM replied to LucasM's topic in AutoIt General Help and Support
ok, that seems to be the anser, but, assigning them with hotkeyset .. wont make them run right ? they ll be like waiting for me to call `em in the function. ? -
What i want to do is to set a definition table for autoit to get . I finally solved the language issue with a dummy file. But what im facing now is another whol different problem I need to set something like this.. If "dummy.file exists" then instead of "!{TAB}" do... "!{F}" <----crazy example Endif i need te set the code from my previous post to obey this scenario. Btw, these hotkeys should only last till i end this function right ? Could this be done ? Any tips ?
-
Determine which language my Internet explorer is running.
LucasM replied to LucasM's topic in AutoIt General Help and Support
Thank you very much BrewManNH and all those who helped me throught this post ! -
LucasM reacted to a post in a topic: Determine which language my Internet explorer is running.
-
Determine which language my Internet explorer is running.
LucasM replied to LucasM's topic in AutoIt General Help and Support
so $ie9hanhle main contain a function that doesnt work with the _IEPropertyGet right ? i need to modify $ie9handle to fit the required parameters of _IEPropertyGet. ? $ieWinStart = "about:blank - Windows Internet Explorer" $ie9Handle = WinGetHandle($ieWinStart) knowing this... the problem is that i wont be able to set this as an $o_object Object variable of an InternetExplorer.Application or DOM element am i right ? im trying to understand this befor trying to rewrite the code. -
Determine which language my Internet explorer is running.
LucasM replied to LucasM's topic in AutoIt General Help and Support
When i try to simplify the code, i still get the same error message. #Include #include #include #Include #include #include $ieWinStart = "about:blank - Windows Internet Explorer" $iewin = "Windows Internet Explorer" $ieFileOpen = "Open" Global $Paused HotKeySet("{F7}","Terminate") HotKeySet("{F5}", "Pause") if not Run(@ProgramFilesDir & "Internet Explorer 9iexplore.exe about:blank") Then SplashOff() MsgBox(4096, "Error", "Path to IE9 not found. Make sure the IE9 Layer is Activated!") Exit EndIf WinWaitActive ($iewin) $ie9Handle = WinGetHandle($ieWinStart) ;~ Local $oIE = _IE_Example("basic") Global $IELanguage = _IEPropertyGet( $ie9handle, "browserlanguage") ConsoleWrite("Language: " & $IELanguage) Select Case not StringInStr ( $IELanguage, "en-us") = 0 If @OSArch = "X86" Then if @OSVersion = "WIN_7" Then FileMenuTestsx32($window) EndIf ElseIf @OSArch = "X64" Then if @OSversion = "WIN_7" Then FileMenuTestsx64($window) EndIf EndIf Case Not StringInStr ( $IELanguage, "") = 0 EndSelect >"C:Program FilesAutoIt3SciTE..autoit3.exe" /ErrorStdOut "C:UsersAdminDesktopAutoIt22222Archivos au3ie9-ui-WIN_7.au3" --> IE.au3 V2.4-0 Error from function _IEPropertyGet, $_IEStatus_InvalidDataType Language: 0>Exit code: 0 Time: 1.032 -
Determine which language my Internet explorer is running.
LucasM replied to LucasM's topic in AutoIt General Help and Support
This is the code. #Include <WinAPI.au3> #include <GUIConstantsEx.au3> #include <IE.au3> #Include <MoreFunctions.au3> #include <ie9-ui-WIN_7 x32.au3> #include <ie9-ui-WIN_7 x64.au3> Dim $runAllTests=False, $runFileTests=False, $runViewTests=False, $runEditTests=False, $runFavTests=False, $runToolTests=False, $runHelpTests=False, $runPrntTests=False, $runNavTests=False, $runPlugTests=False GUICreate("IE9 Automated Testing", 320, 300) GUICtrlCreateLabel("This Autoit Script automates the testing of nearly all UI components, Navigation and Plugins (Adobe Flash, Adobe Reader and Java).", 10, 10, 300, 50) $allTestsCB = GUICtrlCreateCheckbox("Run All Tests", 10, 60, 200) $fileCB = GUICtrlCreateCheckbox("File Menu Tests", 10, 80, 200) $editCB = GUICtrlCreateCheckbox("Edit Menu Tests", 10, 100, 200) $viewCB = GUICtrlCreateCheckbox("View Menu Tests", 10, 120, 200) $favCB = GUICtrlCreateCheckbox("Favorites Menu Tests", 10, 140, 200) $toolsCB = GUICtrlCreateCheckbox("Tools Menu Tests", 10, 160, 200) $helpCB = GUICtrlCreateCheckbox("Help Menu Tests", 10, 180, 200) $printCB = GUICtrlCreateCheckbox("Printing Menu Tests", 10, 200, 200) $navCB = GUICtrlCreateCheckbox("Navigation Test", 10, 220, 200) $plugCB = GUICtrlCreateCheckbox("Plugins Test", 10, 240, 200) $okbutton = GUICtrlCreateButton("OK", 180, 260, 60) $cancelbutton = GUICtrlCreateButton("Cancel", 245, 260, 60) GUISetState(@SW_SHOW) GUICtrlSetState ($allTestsCB, $GUI_CHECKED ) GUICtrlSetState ($fileCB, $GUI_CHECKED ) GUICtrlSetState ($editCB, $GUI_CHECKED ) GUICtrlSetState ($viewCB, $GUI_CHECKED ) GUICtrlSetState ($favCB, $GUI_CHECKED ) GUICtrlSetState ($toolsCB, $GUI_CHECKED ) GUICtrlSetState ($helpCB, $GUI_CHECKED ) GUICtrlSetState ($printCB, $GUI_CHECKED ) GUICtrlSetState ($navCB, $GUI_CHECKED ) GUICtrlSetState ($plugCB, $GUI_CHECKED ) While 1 $msg = GUIGetMsg() Select Case $msg = $cancelbutton Exit Case $msg = $okbutton $uiCtrlState = GUICtrlRead($fileCB, 0) if $uiCtrlState = $GUI_CHECKED Then $runFileTests=True Else $runFileTests=False EndIf $uiCtrlState = GUICtrlRead($editCB, 0) if $uiCtrlState = $GUI_CHECKED Then $runEditTests=True Else $runEditTests=False EndIf $uiCtrlState = GUICtrlRead($viewCB, 0) if $uiCtrlState = $GUI_CHECKED Then $runViewTests=True Else $runViewTests=False EndIf $uiCtrlState = GUICtrlRead($favCB, 0) if $uiCtrlState = $GUI_CHECKED Then $runFavTests=True Else $runFavTests=False EndIf $uiCtrlState = GUICtrlRead($toolsCB, 0) if $uiCtrlState = $GUI_CHECKED Then $runToolTests=True Else $runToolTests=False EndIf $uiCtrlState = GUICtrlRead($helpCB, 0) if $uiCtrlState = $GUI_CHECKED Then $runHelpTests=True Else $runHelpTests=False EndIf $uiCtrlState = GUICtrlRead($printCB, 0) if $uiCtrlState = $GUI_CHECKED Then $runPrntTests=True Else $runPrntTests=False EndIf $uiCtrlState = GUICtrlRead($navCB, 0) if $uiCtrlState = $GUI_CHECKED Then $runNavTests=True Else $runNavTests=False EndIf $uiCtrlState = GUICtrlRead($plugCB, 0) if $uiCtrlState = $GUI_CHECKED Then $runPlugTests=True Else $runPlugTests=False EndIf GUIDelete() ExitLoop Case $msg = $allTestsCB $ctrlState = GUICtrlRead($allTestsCB, 0) if $ctrlState = $GUI_CHECKED Then GUICtrlSetState ($allTestsCB, $GUI_CHECKED ) GUICtrlSetState ($fileCB, $GUI_CHECKED ) GUICtrlSetState ($editCB, $GUI_CHECKED ) GUICtrlSetState ($viewCB, $GUI_CHECKED ) GUICtrlSetState ($favCB, $GUI_CHECKED ) GUICtrlSetState ($toolsCB, $GUI_CHECKED ) GUICtrlSetState ($helpCB, $GUI_CHECKED ) GUICtrlSetState ($printCB, $GUI_CHECKED ) GUICtrlSetState ($navCB, $GUI_CHECKED ) GUICtrlSetState ($plugCB, $GUI_CHECKED ) ElseIf $ctrlState = $GUI_UNCHECKED Then GUICtrlSetState ($allTestsCB, $GUI_UNCHECKED ) GUICtrlSetState ($fileCB, $GUI_UNCHECKED ) GUICtrlSetState ($editCB, $GUI_UNCHECKED ) GUICtrlSetState ($viewCB, $GUI_UNCHECKED ) GUICtrlSetState ($favCB, $GUI_UNCHECKED ) GUICtrlSetState ($toolsCB, $GUI_UNCHECKED ) GUICtrlSetState ($helpCB, $GUI_UNCHECKED ) GUICtrlSetState ($printCB, $GUI_UNCHECKED ) GUICtrlSetState ($navCB, $GUI_UNCHECKED ) GUICtrlSetState ($plugCB, $GUI_UNCHECKED ) EndIf ;ExitLoop Case $msg = $GUI_EVENT_CLOSE Exit EndSelect WEnd GUIDelete() $ieWinStart = "about:blank - Windows Internet Explorer" $iewin = "Windows Internet Explorer" $ieFileOpen = "Open" Global $Paused HotKeySet("{F7}","Terminate") HotKeySet("{F5}", "Pause") SplashTextOn("Beginning IE9 Tests", "Attempting to load IE9", 300, 100, -1, 0, 4) if not Run(@ProgramFilesDir & "Internet Explorer 9iexplore.exe about:blank") Then SplashOff() MsgBox(4096, "Error", "Path to IE9 not found. Make sure the IE9 Layer is Activated!") Exit EndIf WinWaitActive ($iewin) $ie9Handle = WinGetHandle($ieWinStart) If @error Then SplashOff() ;;MsgBox(4096, "Error", "Could not find the correct window") EndIf Opt("WinTitleMatchMode", 1) SplashTextOn("Beginning IE8 Tests", "Setting IE8 for the Tests...", 300, 100, -1, 0, 4) Sleep(2000) NavigateUsingAddr("www.google.com","window") WinWait("Google") ;~ Sleep(2000) ;~ Send("!t") ;~ Sleep(2000) ;~ Send("o") ;~ Sleep(2000) ;~ SplashTextOn("Beginning IE8 Tests", "Setting IE8 for the Tests...: Waiting Internet Options", 300, 100, -1, 0, 4) ;~ WinWait("Internet Options") ;~ SplashTextOn("Beginning IE8 Tests", "Setting IE8 for the Tests...: Found Internet Options", 300, 100, -1, 0, 4) ;~ Sleep(1000) ;~ Send("!c") ;~ Sleep(1000) ;~ Send("{TAB 15}") ;~ sleep(3000) ;~ Send("{ENTER}") ;~ Sleep(2000) ;~ Send("{TAB 15}") ;~ Sleep(3000) ;~ Send("{RIGHT 2}") ;~ sleep(1000) ;~ Send("{TAB 1}") ;~ sleep(1000) ;~ Send("{UP 3}") ;~ Sleep(1000) ;~ Send("{TAB 7}") ;~ Sleep(2000) ;~ Send("{ENTER}") ;~ Sleep(1000) ;~ WinWait("Pop-up Blocker Settings") ;~ Send("{TAB 6}") ;~ Sleep(3000) ;~ Send("{UP 2}") ;~ Sleep(1000) ;~ ControlCommand("Pop-up Blocker Settings", "Show Notification Bar when a pop-up is blocked.", 5417, "UnCheck") ;~ Sleep(2000) ;~ Send("{TAB 5}") ;~ Sleep(2000) ;~ Send("{ENTER}") ;~ Sleep(2000) ;~ Send("{DOWN 3}") ;~ Sleep(3000) ;~ Send("{ENTER}") Sleep(7000) Opt("WinTitleMatchMode", 2) if $runFileTests Then SplashTextOn("Running File Menu Tests", "File Menu Tests", 300, 100, -1, 0, 4) FileMenuTests($ie9handle) SplashOff() EndIf if $runEditTests Then SplashTextOn("Running Edit Menu Tests", "Edit Menu Tests", 300, 100, -1, 0, 4) Sleep(3000) EditMenuTests($ie9handle) SplashOff() EndIf if $runViewTests Then SplashTextOn("Running View Menu Tests", "View Menu Tests", 300, 100, -1, 0, 4) ViewMenuTests($ie9handle) SplashOff() EndIf if $runFavTests Then SplashTextOn("Running Favorites Menu Tests", "Favorites Menu Tests", 300, 100, -1, 0, 4) FavoritesMenuTests($ie9handle) SplashOff() EndIf if $runToolTests Then SplashTextOn("Running Tools Menu Tests", "File Tools Tests", 300, 100, -1, 0, 4) ToolsMenuTests($ie9handle) SplashOff() EndIf if $runHelpTests Then SplashTextOn("Running Help Menu Tests", "Help Menu Tests", 300, 100, -1, 0, 4) HelpMenuTests($ie9handle) SplashOff() EndIf if $runPrntTests Then SplashTextOn("Running IE9 Printing Tests", "Running IE9 Print Function Tests", 300, 100, -1, 0, 4) Sleep(1000) ;Navigate to a site so there is something to print NavigateUsingAddr("www.google.com", $ie9handle) Sleep(5000) ; give some time for the site to load. PrintingTest($ie9handle) Sleep(5000) SplashOff() EndIf if $runNavTests Then SplashTextOn("Running IE9 Navigation Tests", "Running IE9 Navigation Tests", 300, 100, -1, 0, 4) NavigationTests($ie9handle) Sleep(5000) SplashOff() EndIf if $runPlugTests Then SplashTextOn("Running IE9 Plugin Tests", "Running IE9 Plugin Tests", 300, 100, -1, 0, 4) PluginTests($ie9handle) Sleep(5000) SplashOff() EndIf SplashTextOn("Running IE9 Tests", "Selected Tests are Completed!", 300, 100, -1, 0, 4) Sleep(6000) SplashOff() WinClose($ie9handle) ;DONE Func NavigateUsingOpen($url) Send("^o") WinWait($ieFileOpen) Sleep(1000) Send($url, 1) Sleep(1000) Send("{ENTER}") ;Sleep(1000) ;ControlClick($ieFileOpen, "", 1) EndFunc Func NavigateUsingAddr($url, $window) ControlFocus($window, "", "[CLASS:ComboBox; INSTANCE:1]") Sleep(1000) Send("!d") Sleep(1000) Send($url, 1) Sleep(1000) Send("{ENTER}") EndFunc Func FileMenuTests($window) ;~ Local $oIE = _IE_Example("basic") Global $IELanguage = _IEPropertyGet( $ie9handle, "browserlanguage") ;~ ConsoleWrite("Language: " & $IELanguage) Select Case not StringInStr ( $IELanguage, "en-us") = 0 If @OSArch = "X86" Then if @OSVersion = "WIN_7" Then FileMenuTestsx32($window) EndIf ElseIf @OSArch = "X64" Then if @OSversion = "WIN_7" Then FileMenuTestsx64($window) EndIf EndIf Case Not StringInStr ( $IELanguage, "") = 0 EndSelect EndFunc -
Determine which language my Internet explorer is running.
LucasM replied to LucasM's topic in AutoIt General Help and Support
Apparently, the $ie9Handle works with other fuctions. But not with this one particularlly Seen the error displayed above, How would you solve this ? -
Determine which language my Internet explorer is running.
LucasM replied to LucasM's topic in AutoIt General Help and Support
hahaha, yes i tried that .. and this is what i get. --> IE.au3 V2.4-0 Error from function _IEPropertyGet, $_IEStatus_InvalidDataType -
Determine which language my Internet explorer is running.
LucasM replied to LucasM's topic in AutoIt General Help and Support
i see, but when i try to use _IEPropertyGet("", "browserlanguage") nothing happens. So im having some kind of issue. Thats why i tried the "$oIE" thing. Ive looked up the iEpropertyget help file... but i cant figure out what i need to do.. neither my or my work partners.. ç we are stucked here.- -
Determine which language my Internet explorer is running.
LucasM replied to LucasM's topic in AutoIt General Help and Support
#include <IE.au3> Local $oIE = _IE_Example("basic") ConsoleWrite(_IEPropertyGet($oIE, "browserlanguage") & @LF) The problem is that i need to use another handler on _IEPropertyGet function. This is what i`ve done so far. [ autoit ] ( ) Func FileMenuTests($window) Local $oIE = _IE_Example("basic") Local $IELanguage = _IEPropertyGet($oIE , "browserlanguage") - my handler actually is $ie9handle but the only way i get to use porperty get.. is this way. ConsoleWrite("Language: " & $IELanguage) Select Case not StringInStr ( $IELanguage, "en-us") = 0 If @OSArch = "X86" Then if @OSVersion = "WIN_7" Then FileMenuTestsx32($window) EndIf ElseIf @OSArch = "X64" Then if @OSversion = "WIN_7" Then FileMenuTestsx64($window) EndIf EndIf Case Not StringInStr ( $IELanguage, "") = 0 EndSelect EndFunc is it because $oIE handler refers to #include <IE.au3>? how can i make this work for me ? -
Help with my code again. Language detection
LucasM replied to LucasM's topic in AutoIt General Help and Support
ok. let me try -
Help with my code again. Language detection
LucasM posted a topic in AutoIt General Help and Support
Hi guys, its me again. Yesterday BrewManNH posted This on my thread #include <IE.au3> Local $oIE = _IE_Example("basic") ConsoleWrite(_IEPropertyGet($oIE, "browserlanguage") & @LF) The problem is that i need to use another handler on _IEPropertyGet function. This is what i`ve done so far. Func FileMenuTests($window) Local $oIE = _IE_Example("basic") Local $IELanguage = _IEPropertyGet($oIE , "browserlanguage") - my handler actually is $ie9handle but the only way i get to use porperty get.. is this way. ConsoleWrite("Language: " & $IELanguage) Select Case not StringInStr ( $IELanguage, "en-us") = 0 If @OSArch = "X86" Then if @OSVersion = "WIN_7" Then FileMenuTestsx32($window) EndIf ElseIf @OSArch = "X64" Then if @OSversion = "WIN_7" Then FileMenuTestsx64($window) EndIf EndIf Case Not StringInStr ( $IELanguage, "") = 0 EndSelect EndFunc is it because $oIE handler refers to #include <IE.au3>? how can i make this work for me ?