Jump to content

Search the Community

Showing results for tags 'firefox'.



More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • General
    • Announcements and Site News
    • Administration
  • AutoIt v3
    • AutoIt Help and Support
    • AutoIt Technical Discussion
    • AutoIt Example Scripts
  • Scripting and Development
    • Developer General Discussion
    • Language Specific Discussion
  • IT Administration
    • Operating System Deployment
    • Windows Client
    • Windows Server
    • Office

Categories

  • AutoIt Team
    • Beta
    • MVP
  • AutoIt
    • Automation
    • Databases and web connections
    • Data compression
    • Encryption and hash
    • Games
    • GUI Additions
    • Hardware
    • Information gathering
    • Internet protocol suite
    • Maths
    • Media
    • PDF
    • Security
    • Social Media and other Website API
    • Windows
  • Scripting and Development
  • IT Administration
    • Operating System Deployment
    • Windows Client
    • Windows Server
    • Office

Categories

  • Forum
  • AutoIt

Calendars

  • Community Calendar

Found 42 results

  1. All, I have decided to release my code for the automated clean install, set up and configuration of Mozilla Firefox with a Mozilla.cfg file included in my example as well. I seen an older version of this and decided to post mine on here. This is Windows 10 friendly. The whole process once compiled executes in about 15 seconds on my machine from start to finish as it is extremely fast. If you want to include your own Mozilla.cfg into the mix simply place Your Mozilla.cfg file in the same directory as the exe when it is run. If you do not wish to embed the Mozilla.cfg file into the script as a back up in case you forget you need to remove that line of code to embed it. I hope this helps some people esp those wanting to understand how to use a cfg file to set default settings for all users without having to do it by putting all those files and folders in the defaultapp data folders. #RequireAdmin #Region ;**** Directives created by AutoIt3Wrapper_GUI **** #AutoIt3Wrapper_Icon=Clear-App-firefox.ico #AutoIt3Wrapper_Outfile=FirefoxUpdater(x64Stable)_x.exe #AutoIt3Wrapper_Compression=4 #AutoIt3Wrapper_UseUpx=y #AutoIt3Wrapper_UseX64=y #AutoIt3Wrapper_Res_Comment=Preformes a clean install of Firefox 64bit Stable version. Auto downloads latest version. #AutoIt3Wrapper_Res_Description=Updates to the Latest 64bit Stable #AutoIt3Wrapper_Res_Fileversion=2.5.0.0 #AutoIt3Wrapper_Res_ProductVersion=2.5.0.0 #AutoIt3Wrapper_Res_Language=1033 #EndRegion ;**** Directives created by AutoIt3Wrapper_GUI **** #include <InetConstants.au3> #include <EventLog.au3> #include <Inet.au3> #include <File.au3> #include <array.au3> #include <Misc.au3> #include <TrayConstants.au3> ; Required for the $TRAY_CHECKED and $TRAY_ICONSTATE_SHOW constants. If UBound(ProcessList(@ScriptName)) > 2 Then Exit TraySetToolTip("Firefox Updater") HotKeySet("^!m", "MyExit") ; ctrl+Alt+m kills program ( hotkey ) Opt("TrayMenuMode", 3) ; The default tray menu items will not be shown and items are not checked when selected. These are options 1 and 2 for TrayMenuMode. Opt("TrayOnEventMode", 1) ; Enable TrayOnEventMode. TrayCreateItem("About") TrayItemSetOnEvent(-1, "About") TrayCreateItem("") ; Create a separator line. TrayCreateItem("Exit") TrayItemSetOnEvent(-1, "ExitScript") TraySetOnEvent($TRAY_EVENT_PRIMARYDOUBLE, "About") ; Display the About MsgBox when the tray icon is double clicked on with the primary mouse button. TraySetState($TRAY_ICONSTATE_SHOW) ; Show the tray menu. Local $sVersion, $CVersion, $ecode ;https://www.mozilla.org/en-US/firefox/developer/all/ ;https://www.mozilla.org/en-US/firefox/all/# ;https://www.mozilla.org/en-US/firefox/all/#en-US ;https://www.mozilla.org/en-US/firefox/beta/all/#en-US ;https://archive.mozilla.org/pub/firefox/candidates/48.0b1-candidates/build2/ ;https://archive.mozilla.org/pub/firefox/candidates/ getfiles() compare() killapps() uninstall() dlinstall() Exit Func killapps() ; kill firefox and plugin if running If FileExists("C:\Program Files\Mozilla Firefox\") Then $cmd = "taskkill.exe /im firefox.exe /f /t" RunWait('"' & @ComSpec & '" /c ' & $cmd, @SystemDir, @SW_HIDE) Sleep(300) $cmd = "taskkill.exe /im plugin* /f /t" RunWait('"' & @ComSpec & '" /c ' & $cmd, @SystemDir, @SW_HIDE) Sleep(300) Call("remcfg64") EndIf If FileExists("C:\Program Files (x86)\Mozilla Firefox\") Then $cmd = "taskkill.exe /im firefox.exe /f /t" RunWait('"' & @ComSpec & '" /c ' & $cmd, @SystemDir, @SW_HIDE) Sleep(300) $cmd = "taskkill.exe /im plugin* /f /t" RunWait('"' & @ComSpec & '" /c ' & $cmd, @SystemDir, @SW_HIDE) Sleep(300) Call("remcfg32") EndIf EndFunc ;==>killapps Func remcfg64() ; delete existing config file if exist $SSlist = _FileListToArrayRec("C:\Program Files\Mozilla Firefox\", "*", $FLTAR_FILES, $FLTAR_RECUR, $FLTAR_NOSORT, $FLTAR_FULLPATH) For $i = 1 To UBound($SSlist) - 1 If StringInStr($SSlist[$i], "mozilla.cfg") > 1 Then FileDelete($SSlist[$i]) ElseIf StringInStr($SSlist[$i], "override.ini") > 1 Then FileDelete($SSlist[$i]) ElseIf StringInStr($SSlist[$i], "local-settings.js") > 1 Then FileDelete($SSlist[$i]) EndIf Next EndFunc ;==>remcfg64 Func remcfg32() $SSlist = _FileListToArrayRec("C:\Program Files (x86)\Mozilla Firefox\", "*", $FLTAR_FILES, $FLTAR_RECUR, $FLTAR_NOSORT, $FLTAR_FULLPATH) For $i = 1 To UBound($SSlist) - 1 If StringInStr($SSlist[$i], "mozilla.cfg") > 1 Then FileDelete($SSlist[$i]) ElseIf StringInStr($SSlist[$i], "override.ini") > 1 Then FileDelete($SSlist[$i]) ElseIf StringInStr($SSlist[$i], "local-settings.js") > 1 Then FileDelete($SSlist[$i]) EndIf Next EndFunc ;==>remcfg32 Func uninstall() ; uninstall existing Firefox If FileExists("C:\Program Files\Mozilla Firefox\Firefox.exe") Then ShellExecuteWait("helper.exe", " /S", "C:\Program Files\Mozilla Firefox\uninstall") EndIf If FileExists("C:\Program Files (x86)\Mozilla Firefox\Firefox.exe") Then ShellExecuteWait("helper.exe", " /S", "C:\Program Files (x86)\Mozilla Firefox\uninstall") EndIf Sleep(1500) DirRemove("C:\Program Files (x86)\Mozilla Firefox\", 1) DirRemove("C:\Program Files\Mozilla Firefox\", 1) EndFunc ;==>uninstall Func getfiles() ; get latest download Local $sTxt, $sTxt1 $xjs = "C:\windows\temp\xjs.tmp" $xjs1 = "C:\windows\temp\xjs1.tmp" ;$sSite = "https://www.mozilla.org/en-US/firefox/beta/all/" $sSite = "https://www.mozilla.org/en-US/firefox/all/" ;$sNotes = "https://www.mozilla.org/en-US/firefox/beta/notes/" $sNotes = "https://www.mozilla.org/en-US/firefox/notes/" SplashTextOn("Progress", "", 210, 75, -1, -1, 18, "Tahoma", 10) ControlSetText("Progress", "", "Static1", "Initializing", 2) $source = _INetGetSource($sSite) $sTxt = StringSplit($source, @LF) $q = 0 $i = 0 For $i = 1 To UBound($sTxt) - 1 ; is like saying read the line number ;GUIGetMsg();prevent high cpu usage If StringInStr($sTxt[$i], "=win64&amp;lang=en-US") > 1 Then $sActiveX1 = StringSplit($sTxt[$i], 'href="', 1) $sActiveX2 = StringSplit($sActiveX1[2], '"') Global $dia = $sActiveX2[1] $q = 1 EndIf If UBound($sTxt) - 1 = $i Then $ecode = '404' EventLog() Exit EndIf If $q = 1 Then ExitLoop EndIf Next ; FIND VERSION $source = _INetGetSource($sNotes) $sTxt1 = StringSplit($source, @LF) $q = 0 $i = 0 For $i = 1 To UBound($sTxt1) - 1 ; is like saying read the line number ;GUIGetMsg();prevent high cpu usage If StringInStr($sTxt1[$i], "<title>Firefox") > 1 Then $sActiveX1 = StringSplit($sTxt1[$i], '<title>Firefox', 1) $sActiveX2 = StringSplit($sActiveX1[2], ',') $sVersion = StringStripWS($sActiveX2[1], 3) $q = 1 EndIf If $sVersion = "" Then ; error correcting if mozilla changes page where version notes are located. $sVersion = "Current Version" EndIf If $q = 1 Then ExitLoop EndIf Next SplashOff() EndFunc ;==>getfiles Func dlinstall() ; download and install $Version = $sVersion & " - 64 bit" _webDownloader($dia, "FFInstall.exe", $Version) SplashTextOn("Progress", "", 210, 75, -1, -1, 18, "Tahoma", 10) ControlSetText("Progress", "", "Static1", "Installing Version " & $sVersion, 2) ShellExecuteWait("FFInstall.exe", " -ms", "C:\Windows\Temp\") If FileExists(@ScriptDir & "\mozilla.cfg") Then FileCopy(@ScriptDir & "\mozilla.cfg", "C:\Program Files\Mozilla Firefox\mozilla.cfg", 1) Else FileInstall("G:\Users\username\Documents\Project\FirefoxDefault\mozilla.cfg", "C:\Program Files\Mozilla Firefox\mozilla.cfg", 1) EndIf FileWrite("C:\Program Files\Mozilla Firefox\defaults\pref\local-settings.js", 'pref("general.config.obscure_value", 0);' & @CRLF & 'pref("general.config.filename", "mozilla.cfg");' & @CRLF) FileWrite("C:\Program Files\Mozilla Firefox\browser\override.ini", '[XRE]' & @CRLF & 'EnableProfileMigrator=false' & @CRLF) FileDelete("C:\windows\temp\" & "\FFInstall.exe") $CVersion = FileGetVersion('C:\Program Files\Mozilla Firefox\firefox.exe', $FV_PRODUCTVERSION) SplashOff() EndFunc ;==>dlinstall Func _webDownloader($sSourceURL, $sTargetName, $sVisibleName, $sTargetDir = "C:\windows\temp", $bProgressOff = True, $iEndMsgTime = 2000, $sDownloaderTitle = "Mozilla Firefox") ; Declare some general vars Local $iMBbytes = 1048576 ; If the target directory doesn't exist -> create the dir If Not FileExists($sTargetDir) Then DirCreate($sTargetDir) ; Get download and target info Local $sTargetPath = $sTargetDir & "\" & $sTargetName Local $iFileSize = InetGetSize($sSourceURL) Local $hFileDownload = InetGet($sSourceURL, $sTargetPath, $INET_LOCALCACHE, $INET_DOWNLOADBACKGROUND) ; Show progress UI ProgressOn($sDownloaderTitle, "" & $sVisibleName) GUISetFont(8, 400) ; Keep checking until download completed Do Sleep(250) ; Set vars Local $iDLPercentage = Round(InetGetInfo($hFileDownload, $INET_DOWNLOADREAD) * 100 / $iFileSize, 0) Local $iDLBytes = Round(InetGetInfo($hFileDownload, $INET_DOWNLOADREAD) / $iMBbytes, 2) Local $iDLTotalBytes = Round($iFileSize / $iMBbytes, 2) ; Update progress UI If IsNumber($iDLBytes) And $iDLBytes >= 0 Then ProgressSet($iDLPercentage, $iDLPercentage & "% - Downloaded " & $iDLBytes & " MB of " & $iDLTotalBytes & " MB") Else ProgressSet(0, "Downloading '" & $sVisibleName & "'") EndIf Until InetGetInfo($hFileDownload, $INET_DOWNLOADCOMPLETE) ; If the download was successfull, return the target location If InetGetInfo($hFileDownload, $INET_DOWNLOADSUCCESS) Then ProgressSet(100, "Downloading '" & $sVisibleName & "' completed") If $bProgressOff Then Sleep($iEndMsgTime) ProgressOff() EndIf Return $sTargetPath ; If the download failed, set @error and return False Else Local $errorCode = InetGetInfo($hFileDownload, $INET_DOWNLOADERROR) ProgressSet(0, "Downloading '" & $sVisibleName & "' failed." & @CRLF & "Error code: " & $errorCode) If $bProgressOff Then Sleep($iEndMsgTime) ProgressOff() EndIf SetError(1, $errorCode, False) FileDelete("C:\windows\temp\" & "\FFInstall.exe") SplashOff() EndIf EndFunc ;==>_webDownloader Func compare() $CVersion = FileGetVersion('C:\Program Files\Mozilla Firefox\firefox.exe', $FV_PRODUCTVERSION) If $sVersion = $CVersion Then $ecode = '411' MsgBox(64, "Firefox says:", 'You have the latest version ' & $CVersion , 5) EventLog() Exit EndIf EndFunc ;==>compare Func EventLog() If $ecode = '404' Then Local $hEventLog, $aData[4] = [0, 4, 0, 4] $hEventLog = _EventLog__Open("", "Application") _EventLog__Report($hEventLog, 1, 0, 404, @UserName, @UserName & ' No "exe" found for Mozilla Firefox. The webpage and/or download link might have changed. ' & @CRLF, $aData) _EventLog__Close($hEventLog) EndIf If $ecode = '411' Then Local $hEventLog, $aData[4] = [0, 4, 1, 1] $hEventLog = _EventLog__Open("", "Application") _EventLog__Report($hEventLog, 0, 0, 411, @UserName, @UserName & " Mozilla Firefox " & "version " & $CVersion & " successfully installed." & @CRLF, $aData) _EventLog__Close($hEventLog) EndIf EndFunc ;==>EventLog Func MyExit() Exit EndFunc ;==>MyExit Func About() ; Display a message box about the AutoIt version and installation path of the AutoIt executable. MsgBox($MB_SYSTEMMODAL, "", "Firefox Update Tool" & @CRLF & @CRLF & _ "Version: 2.5.0.0" & @CRLF & _ "Firefox Updater by Carm0@Sourceforge" & @CRLF & "CTRL+ALT+m to kill", 5) ; Find the folder of a full path. EndFunc ;==>About Func ExitScript() Exit EndFunc ;==>ExitScript #comments-start http://superuser.com/questions/823530/change-some-default-settings-for-firefox-globally http://mxr.mozilla.org/mozilla-release/source/browser/app/profile/firefox.js#387 http://smallbusiness.chron.com/change-default-homepage-users-54727.html https://developer.mozilla.org/en-US/Firefox/Enterprise_deployment https://mike.kaply.com/2012/03/16/customizing-firefox-autoconfig-files/ https://wiki.mozilla.org/Installer:Command_Line_Arguments https://support.mozilla.org/en-US/questions/971189 http://forums.mozillazine.org/viewtopic.php?p=2228066 http://forums.mozillazine.org/viewtopic.php?f=38&t=2950829 ; updates auto http://forums.mozillazine.org/viewtopic.php?f=8&t=2753795 http://superuser.com/questions/697018/how-to-disable-popups-in-firefox-without-add-ons http://www.itninja.com/blog/view/deploy-popup-allowed-sites-with-firefox deploy with certain opous enabled #ce Mozilla.cfg file: // pref("browser.search.geoSpecificDefaults", false); pref("browser.search.defaultenginename.US", "data:text/plain,browser.search.defaultenginename.US=Google"); //https://support.mozilla.org/en-US/questions/1034136 // set Firefox Default homepage defaultPref("browser.startup.homepage", "data:text/plain,browser.startup.homepage=https://www.startpage.com/do/mypage.pl?prf=381c658b828c3fe50ec7563137fef98f"); // Don't show WhatsNew on first run after every update pref("browser.startup.homepage_override.mstone","ignore"); // disables the 'know your rights' button from displaying on first run pref("browser.rights.3.shown", true); pref("browser.usedOnWindows10", true); pref("browser.rights.override", true); // Do not perform system default browser check on startup pref("browser.shell.checkDefaultBrowser", false); // set all plugins to always activated - two settings pref("plugin.default.state", 2); // https://support.mozilla.org/en-US/questions/982143 reference about click to play flash // set flash and silverlight always ask = 1 always activate = 2 defaultPref("plugin.state.flash", 2); // hide choose what i share which pops up at the bottom after a minute lockPref("datareporting.policy.dataSubmissionPolicyBypassNotification", true); // https://groups.google.com/forum/#!topic/mozilla.support.firefox/DRXvfTA6Hnc //disable the "Improve Firefox" suggestion pref("toolkit.telemetry.prompted", 2); //https://support.mozilla.org/en-US/questions/898549 // do not block popups - can only be default or locked pref defaultPref("dom.disable_open_during_load", false); //http://superuser.com/questions/697018/how-to-disable-popups-in-firefox-without-add-ons //lockpref("privacy.sanitize.migrateFx3Prefs", true); // http://www.pcc-services.com/kixtart/firefox-lockdown.html //pref("browser.privatebrowsing.autostart", true); // prevent reader view from popping down at the top pref("reader.parse-on-load.enabled",false); // click to play - disabled so you are not prompted - https://support.mozilla.org/en-US/questions/934809 pref("plugins.click_to_play", false); // below will set the cache only to clear on exit, you need to tell it what to do with the reset of the data not just cache leave cache out. Just add a '\\' to whatever you want to clear on browser exit. //defaultPref("privacy.clearOnShutdown.cookies", false); defaultPref("privacy.clearOnShutdown.downloads", false); defaultPref("privacy.clearOnShutdown.formdata", false); defaultPref("privacy.clearOnShutdown.history", false); defaultPref("privacy.clearOnShutdown.sessions", false); defaultPref("privacy.sanitize.migrateClearSavedPwdsOnExit", false); defaultPref("privacy.sanitize.sanitizeOnShutdown", true); //pref("browser.privatebrowsing.autostart", true); //prevent autoplay https://support.mozilla.org/en-US/questions/1103127 //defaultPref("media.autoplay.enabled", false); //https://wiki.mozilla.org/Electrolysis //pref("browser.tabs.remote.autostart", true); //pref("browser.tabs.remote.force-enable", true); // ref: http://www.itninja.com/question/firefox-22-for-enterprise-deployment-default-preferences // Prevent refresh message showing at the bottom if firefox is not used in a while - http://techdows.com/2016/05/firefox-reinstall-to-prompt-for-a-refresh.html https://support.mozilla.org/en-US/questions/1084402 pref("browser.disableResetPrompt", true); // disable plugin check - https://support.mozilla.org/en-US/questions/968056 //defaultPref("plugin.scan.plid.all",false); //defaultPref("plugins.update.url",""); // disable remember preferences //defaultPref("signon.rememberSignons", false); //https://twitter.com/HighTechDad/status/955916813178691584 //https://t.co/YTvSy9EBJ1 // defaultPref can also be lockPref defaultPref("privacy.donottrackheader.enabled", true); //defaultPref("privacy.trackingprotection.enabled", true); lockPref("privacy.trackingprotection.introCount", 20);
  2. Hello, usually I do Win automations, so I have no skills at all to handle HTML forms :-/ The script to catch and syntax check the required information from Excel is done. Now I'd like to automate the upload using this form, too: http://flashcardsdeluxe.com/flashcards/Upload.aspx What browser is easiest to do so? (IE, Chrome, FF) The Values $DeckCode, $DeckName, $DeckDefinition shall go to their HTML form fields finally "click" the button "upload flashcards" <table width="70%" class="cssCenter" border="0"> <tr> <td style="width: 1%">Deck&nbsp;Code</td> <td style="width: 100%"><input name="ctlDeckCode" type="text" id="ctlDeckCode" style="width:50%;" /> (no spaces allowed)</td> <td></td> </tr> <tr> <td style="width: 1%">Deck&nbsp;Name</td> <td style="width: 100%"><input name="ctlDeckName" type="text" id="ctlDeckName" style="width:50%;" /> (optional)</td> <td style="width: 1%" align="right"><input type="submit" name="ctlUpload" value="Upload Flashcards" id="ctlUpload" /></td> </tr> <tr> <td valign="top" style="padding-top: 5px" >Flashcard&nbsp;Text</td> <td colspan="2"><textarea name="ctlFlashcardText" rows="2" cols="20" id="ctlFlashcardText" style="height:280px;width:100%;"></textarea></td> </tr> </table> If someone kindly could jump in showing how to address just one of the input fields and how to "click" the "upload flashcards" button, I should be able to do the rest myself. TIA, Rudi.
  3. I have to open a URL on Mozilla Firefox , cursor is by default userid textbox, had to send userid, send tab, send pwd with flag 1 , send tab, send Enter. But Script is Failing to take Password. Any Help #include <Constants.au3> #include <IE.au3> #include <PassMask.au3> If $CmdLine[0] <> 3 Then MsgBox($MB_OK, "Usage", "ps_weblogin_FireFox <Url> <Browser Title> <Text to Send>") Else web_login($CmdLine[1], $CmdLine[2], $CmdLine[3]) EndIf Func web_login($bt_url, $bt_Title, $bt_SendText) Local $ff = Run("C:\Program Files (x86)\Mozilla Firefox\firefox.exe " & $bt_url) WinWaitActive($bt_Title) Sleep(2000) ControlSend("","","",$bt_SendText) EndFunc _______________________________________________ _______________________________________________ Func Mask_Password($Password) $MaskPassword = $Password $MaskPassword = StringReplace($MaskPassword, "#", "||||||#@@@@@@") $MaskPassword = StringReplace($MaskPassword, "!", "||||||!@@@@@@") $MaskPassword = StringReplace($MaskPassword, "+", "||||||+@@@@@@") $MaskPassword = StringReplace($MaskPassword, "^", "||||||^@@@@@@") $MaskPassword = StringReplace($MaskPassword, "{", "||||||{@@@@@@") $MaskPassword = StringReplace($MaskPassword, "}", "||||||}@@@@@@") $MaskPassword = StringReplace($MaskPassword, "||||||", "{") $MaskPassword = StringReplace($MaskPassword, "@@@@@@", "}") Return $MaskPassword EndFunc
  4. Profiler

    Profiler - yet another backup script for Firefox and Thunderbird profiles It automatically detects the last recently used profile directories of Firefox and Thunderbird (installed versions, no portables). Clicking the Backup-Button creates a complete Backup of the found profiles with a timestamp. Restore deletes the according profile dir and extracts the content of the selected archive into the profile directory. Uses Winrar as compression tool, but feel free to change it to your needs Best regards Marc Profiler.au3
  5. I'm trying to get the output data from https://www.guilded.gg but it uses a web app that generates that output on the fly and this doesn't show up in the page source. Only in web inspector of each browser does this data show up. How do I read this data in autoit (equivalent to the web inspector) thank you
  6. Hello, I've recently updated from Firefox 50 to 54.0.1. My Autoit script that previously worked fine, now seems to have erratic problems. It's almost as if some Send() commands are sometimes skipped when dealing with the Firefox UI (it's still mostly fine on the actual pages). To temporarly fix the problem, I had to put some Sleep(200) pauses and avoid grouping keys together (e.g: TAB 2), but I'm not exactly sure about the correct way to deal with this.. Could this be caused by the new multiprocess feature? (e10s) Are there better Autoit commands or rules that I should use?
  7. Hello. We work with the BMC Remedy site to manage incidents and would like to automate the processes of clicking through this button code: <a href="javascript:" class="btn btn3d menu" style="top:21; left:184; width:21; height:21;"> <img class="btnimg" src="../../../../resources/images/mt_sprites.gif" alt="menu category issue" title=""> </a> I use firefox with mozrepl and autoit with include FF.au3 I need your help I read the topic https://www.autoitscript.com/forum/topic/95595-ffau3-v0601b-10/ but I could not run the code from the listed commands ... It is necessary to press the button and from the list of the menu of cahorsations to select the item = "zone of trust abonent" Screen # 1 http://joxi.ru/52aJK7bh4a7ypA or below. 1) Press button <a href="javascript:" class="btn btn3d menu" style="top:21; left:184; width:21; height:21;"> <img class="btnimg" src="../../../../resources/images/mt_sprites.gif" alt="menu category issue" title=""> </a> 2) After pressing the button, I need to choose in this menu of 4 items to select an item called "zone of trust abonent", Screen # 2 - http://joxi.ru/p27gwQKHo71VQ2 html code table items <table class="MenuTable" cellpadding="0" cellspacing="0" style="width: 179px;"> <tbody class="MenuTableBody"> <tr class="MenuTableRow"> <td class="MenuEntryName" nowrap="">zone of trust abonent</td> <td class="MenuEntryNoSub" arvalue="zone of trust abonent"></td> </tr> <tr class="MenuTableRow"><td class="MenuEntryName" nowrap="">zone of trust operator</td> <td class="MenuEntryNoSub" arvalue="zone of trust operator"></td> </tr> <tr class="MenuTableRow"><td class="MenuEntryName" nowrap="">zone of trust third operator</td> <td class="MenuEntryNoSub" arvalue="zone of trust third operator"></td></tr> <tr class="MenuTableRow"><td class="MenuEntryNameHover" nowrap="">No settings</td> <td class="MenuEntryNoSubHover" arvalue="No settings"></td> </tr> </tbody> </table> More in detail, I choose from the menu item "zone of trust abonent" Screen # 3 - http://joxi.ru/GrqVq4ZIQEPW4m 3) The choice is made, Screen # 4 http://joxi.ru/v297w6aC3PovLr <textarea class="text sr " wrap="off" id="arid_WIN_0_1000002488" cols="20" maxlen="60" style="top:21; left:0; width:179; height:21;" armenu="CFG:PRC:CategoryHPD-Res-T1-Q" mstyle="2" arautoc="1" arautocmb="1" arautocak="0" arautoctt="400" rows="1"> </textarea> It's all. I would be very grateful to you =) !!!!!!!!!! Here are more detailed codes in the attachment. button1.txt menu - table.txt all.txt
  8. How can I check if element is focused in Firefox using FF.au3 UDF? This is my try: I have prepared a function that checks if the object is focused: _FFCmd('FFau3.isfocused=function isfocused(a){try{return (a === document.activeElement)}catch(e){return}}') $oElm = _FFXPath("//*[@id='someId']") ConsoleWrite(_FFIsFocused($oElm)) Func _FFIsFocused($sElement = "") Local $isFoc = _FFCmd("FFau3.isfocused(" & $sElement & ")") Return $isFoc EndFunc ;==>_FFIsFocused Now, the javascript part is tested and it does return successfully. After a lot of try/fails I inserted an alert box in order to display the object being compared. Here is what I got The focused object is: [object XULElement] The object that I send for comparing is [object HTMLInputElement] Why is that?
  9. Is it possible to know if a textbox is active in FireFox? This is what I want: if (Textbox in FireFox == Active) { }
  10. I want to pass "about:config" to firefox If i do ShellExecute ("firefox.exe","about:config"), i get new instance of firefox opening up which is bad because it makes changes to another profile instead of one that is currently running. Any ideas ?
  11. hello everyone, I'm new with AutoIT and just looking for a way to open Firefox with random window size i have tried too many different samples from the web, some how it works but i can't make it works with Firefox MozRpel and ff.au3 installed right now i can open Firefox with this code, but i still can't control the window of Firefox ; open firefox #include <ff.au3> _FFStart() ; open firefox with random size
  12. I have a script that sends multiple lines of text to a textbox using Firefox. I using _FFSetValue($sCellValue[7], "line one" & @CR & "line two", "id") from ff.au3. If it's a single line of text it works but MozRepl give the following error with multiple lines of text. Error: __FFSend: try{FFau3.simulateEvent(window.content.top.document.getElementById('line one line two'),'Event','change',13);}catch(e){'_FFCmd_Err';}; __FFWaitForRepl ==> Error return value: MozRepl ....> __FFSend: ; __FFRecv: __FFSend: FFau3.WCD=window.content.top.document; __FFWaitForRepl ==> Error return value: MozRepl ....> __FFRecv: !!! SyntaxError: unterminated string literal Details: [object HTMLDocument] - {mainForm: {...}, location: {...}, getElementsByName: function() {...}, getItems: function() {...}, open: function() {...}, close: function() {...}, write: function() {...}, ...} !!! SyntaxError: unterminated string literal Will MozRepl plugin for Firefox send multiple lines of text to a textbox? Thanks for your help.
  13. hello I'm using a firefox script to access a web url, it's gathering weblogin url, username password etc from another server, but it fails because each time it runs firefox it launches with default firefox wizards such as importing bookmarks from IE and then a popup to check whether firefox is default browser or not. how can I prevent this? what kind of code should I add? if needed I can also share the script.
  14. Well I guess my title summarizes the question. What do I need to change in script? Should I only edit IE paths to Firefox?
  15. Hello, I'm looking for some direction with how to automate the exporting of an excel report through a javascript driven menu; unfortunately it does not support IE, so Firefox is what i've been trying, and I can navigate all the way through the dashboard and generate the report, but to export it I need to go through the menu. The menu has onmousedown and onmouseover events that I'm not sure how to send. It looks like I can do this with _FFCmd, but it may take several statements.. can someone help me get started? This is the path to export: <div id="mstr395" tstid="" class="mstrmojo-ListBase mstrmojo-ui-Menu unselectable mojo-theme-dark visible" style="top: 0px; right: 100%; bottom: auto; left: auto;" onclick="mstrmojo.dom.captureDomEvent('mstr395','click', self, event)" ondblclick="mstrmojo.dom.captureDomEvent('mstr395','dblclick', self, event)" onmousedown="mstrmojo.dom.captureDomEvent('mstr395','mousedown', self, event)" onmouseover="mstrmojo.dom.captureDomEvent('mstr395','mouseover', self, event)" onmouseout="mstrmojo.dom.captureDomEvent('mstr395','mouseout', self, event)" oncontextmenu="mstrmojo.dom.captureDomEvent('mstr395','contextmenu', self, event)"> <div class="mstrmojo-ui-Menu-item-container" style=""> <a class="item exportToExcel mstrmojo-ui-Menu-item" idx="0" style="" title=""> <div class="micn"></div>Excel</a><a class="item exportToPDF mstrmojo-ui-Menu-item" idx="1" style="" title=""> Sorry I cannot provide access to the dashboard as it has sensitive information. Any feedback is greatly appreciated!
  16. I have a page with a bunch of links that look like this: <input type="submit" name="ctl00$MainContent$DroppedStudents$ClassRptr$ctl01$btnStuProfile" value="" onclick="javascript:WebForm_DoPostBackWithOptions(new WebForm_PostBackOptions(&quot;ctl00$MainContent$DroppedStudents$ClassRptr$ctl01$btnStuProfile&quot;, &quot;&quot;, false, &quot;&quot;, &quot;Helpers/SetStudentAndRedirect.aspx?DU=StudentProfile.aspx&amp;SN=3720&quot;, false, false))" id="ctl00_MainContent_DroppedStudents_ClassRptr_ctl01_btnStuProfile" title="View Student Profile" class="dim-link student-profile" /> I'm able to parse the page and end up with an array of `name` references that look like this: ctl00$MainContent$ClassRptr$ctl01$btnStuProfile ctl00$MainContent$ClassRptr$ctl02$btnStuProfile ctl00$MainContent$ClassRptr$ctl03$btnStuProfile ctl00$MainContent$ClassRptr$ctl04$btnStuProfile ctl00$MainContent$ClassRptr$ctl05$btnStuProfile I can't figure out how to use the Firefox UDF to click on these. I have installed and tested MozRepl and it works. I want to do something like: For $row in $array _FFLinkClick($row, "name") Next Well, I'm going to do more than just click those links, but I can't even get that to work. Right now my error looks like: _FFConnect: OS: WIN_7 WIN32_NT 7601 Service Pack 1 _FFConnect: AutoIt: 3.3.14.2 _FFConnect: FF.au3: 0.6.0.1b-15 _FFConnect: IP: 127.0.0.1 _FFConnect: Port: 4242 _FFConnect: Delay: 2ms _FFConnect: Socket: 580 _FFConnect: Browser: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:46.0) Gecko/20100101 Firefox/46.0 __FFSendJavaScripts: Sending functions to FireFox .......... done __FFSend: FFau3.xpath=null;try{FFau3.xpath=FFau3.WCD.evaluate("//a[contains(@name,'ctl00$MainContent$ClassRptr$ctl01$btnStuProfile')]",FFau3.WCD,null,XPathResult.FIRST_ORDERED_NODE_TYPE,null).singleNodeValue;}catch(e){'_FFXPath_Error: '+e;}; __FFRecv: _FFXPath_Error: TypeError: can't access dead object __FFSend: try{FFau3.simulateEvent(0,'MouseEvents','click');}catch(e){'_FFCmd_Err';}; _FFXPath ==> Error return value: _FFXPath_Error: TypeError: can't access dead object __FFRecv: -3 I have looked at the samples, but I just can't figure out how to do this. I think that it is something with _FFXPath, but that documentation stumps me as well.
  17. Hello , I have developped an AutoIt script for Mozilla Firefox, using the FF.au3 UDF file, but I was wondering there was a way to check if the plugin MozRepl (that is necessary) is installed ? I mean an automatic check with AutoIt code, not going to "Modules" menu and check if MozRepl is in the add-on list of course Thanks
  18. Hello :), I am developing a script with AutoIt for Firefox, to automate performance tests. I have a map, that I have to wait to be loaded, and then I have to click at the center of this map. In order to do this, I get the position of the HTML element representing the map, then I perform a few calculations to find center coordinates. But I have a problem. I use the FF.au3 library, and the function _FFGetPosition to get the coordinates. My function call is $CoordCarte = _FFGetPosition(".getElementById('OpenLayers.Layer.Annotation_3_svgRoot')") and AutoIt gives me this error : "C:\Program Files\AutoIt3\Include\FF.au3" (1928) : ==> Array variable has incorrect number of subscripts or subscript dimension range exceeded.: Local $aRet[6] = [$aElement[0], $aElement[1], $aContent[0], $aContent[1], $aContent[2], $aContent[3]] Local $aRet[6] = [$aElement[0], ^ ERROR I checked the HTML id of the element, and it is correct (I checked in Firefox with Javascript console). I really can't figure out what is my mistake. Could you help me please ? If this can help you, here is my script (comments are in French) : ; ########## ; INCLUSIONS ; ########## #include <Array.au3> #include <FF.au3> #include <String.au3> ; ################## ; PARAMETRES GLOBAUX ; ################## Opt("SendKeyDownDelay",80) ; pas trop rapide pour éviter que des frappes soient perdues Opt("WinTitleMatchMode", 3) ; Noms des fenêtres correspondant exactement Opt("GUIEventOptions", 1) ; ################################################ ; ######## FONCTIONS POUR TESTS DE PERF. ######### ; ################################################ Func FaireUnTest() ; Faire un test de performance pour ArcMap ; ; Return : ; Une chaine de caractères avec les temps de chaque tâche, séparés par des point-virgules Local $LigneTemps = "" ; Contient le temps de chaque tâche, séparés par des point-virgules ; Démarrer Firefox _FFStart() ; Handle de la fenêtre Firefox ouverte $hFirefox = _FFWindowGetHandle() ; Connexion MozRepl _FFConnect() ; ########################### ; ########################### ; ######### TACHE 1 ######### ; ########################### ; ########################### ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ; Connexion au site de Carmen ; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ; Initialisation nouveau timer $hTimer = TimerInit() ; Aller à l'URL de Carmen et attendre son chargement _FFOpenURL("http://carmen.carmencarto.fr/179/OSUR.map#") ; Attendre le chargement de la carte AttendreChargementCarte() ; Ajout temps de la tâche $LigneTemps = $LigneTemps & ";" & TimerDiff($hTimer) / 1000 ; ########################### ; ########################### ; ######### TACHE 2 ######### ; ########################### ; ########################### ;;;;;;;;;;;;;;;;;;;;; ; Localiser 'ACHUN' ; ;;;;;;;;;;;;;;;;;;;;; ; Initialisation nouveau timer $hTimer = TimerInit() ; L'échelle avant le zoom $queryEchelle = ".getElementsByClassName('DescartesGraphicScale')[1].textContent" $EchelleAvantZoom = _FFCmd($queryEchelle) ; On écrit 'ACHUN' dans le champ de commune $InputCommune = _FFObjGet("combo2", "id") _FFObj($InputCommune, "value", "ACHUN") ; Il faut ensuite sélectionner l'élément 'ACHUN' dans la liste déroulante ControlSend($hFirefox, "", "", _StringRepeat("{TAB}", 27)) ; focus sur liste déroulante 'Commune' ControlSend($hFirefox, "", "", _StringRepeat("{DOWN}", 7)) ; sélection élément 'ACHUN' ControlSend($hFirefox, "", "", "{ENTER}") ; validation ; Clic bouton 'Localiser' _FFClick("button", "tag", 0) ; Attendre que le zoom soit fait (ie un changement d'échelle) While _FFCmd($queryEchelle) = $EchelleAvantZoom WEnd ; Attendre le chargement de la carte AttendreChargementCarte() ; Ajout temps de la tâche $LigneTemps = $LigneTemps & ";" & TimerDiff($hTimer) / 1000 ; ########################### ; ########################### ; ######### TACHE 3 ######### ; ########################### ; ########################### ;;;;;;;;;;;;;;;;;;;;;;;;;;;; ; Sélection d'une station ; ;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;########## NE COMPTE PAS DANS LES MESURES ########## ; Inputs 'x' et 'y' de la page web $InputX = _FFObjGet("x", "id") $InputY = _FFObjGet("y", "id") ; Saisie de la position géographique (dans la carte) de la station '04023310' _FFObj($InputX, "value", "747562") _FFObj($InputY, "value", "6667893") ; Centrage de la carte sur la station '04023310' ControlSend($hFirefox, "", "", _StringRepeat("{TAB}", 7)) ; focus sur bouton 'Centrer' ControlSend($hFirefox, "", "", "{ENTER}") ; validation ; On attend le chargement AttendreChargementCarte() ;########## LA SUITE COMPTE MAINTENANT POUR LES MESURES ########## ; Initialisation nouveau timer $hTimer = TimerInit() ; Clic bouton "Interroger les couches" (après navigation avec {TAB} car cela aurait ouvert une fenêtre non voulue) _FFClick("button", "tag", 9) ;$x = _FFObjGet("OpenLayers.Layer.Annotation_3_svgRoot", "id") ;MsgBox(0, $x, $x) ; Coordonnées de la carte, relativement à l'écran d'ordinateur $CoordCarte = _FFGetPosition(".getElementById('OpenLayers.Layer.Annotation_3_svgRoot')") ; Coordonnées coin supérieur gauche $XDebCarte = $CoordCarte[2] $YDebCarte = $CoordCarte[3] MsgBox(0, "$XDebCarte = ", $XDebCarte) MsgBox(0, "$YDebCarte = ", $YDebCarte) ; Coordonnées coin inférieur droit $XFinCarte = $XDebCarte + $CoordCarte[4] $YFinCarte = $YDebCarte + $CoordCarte[5] MsgBox(0, "$XFinCarte = ", $XDebCarte) MsgBox(0, "$YFinCarte = ", $YDebCarte) ; Coordonnées du centre de la carte, relativement à l'écran d'ordinateur $XMilieuCarte = ($XDebCarte + $XFinCarte) / 2 $YMilieuCarte = ($YDebCarte + $YFinCarte) / 2 MsgBox(0, "$XMilieuCarte = ", $XDebCarte) MsgBox(0, "$YMilieuCarte = ", $YDebCarte) ; Cliquer au milieu de la carte MouseClick("left", $XMilieuCarte, $YMilieuCarte, 1, 1) EndFunc FaireUnTest() Func AttendreChargementCarte() ; Met le script en pause jusqu'au chargement complet ; de la carte de l'application Carmen ; Code JavaScript pour récupérer les images de la carte $imagesQuery = ".getElementsByClassName('olTileImage')" ; Le nombre d'images de la carte $NbImages = _FFCmd($imagesQuery & ".length") ; On attend que toutes les images de la carte soit chargées For $i = 0 To $NbImages - 1 ; Le code JavaScript pour savoir si la i-ème image est chargée $imageCompleteQuery = $imagesQuery & "[" & $i & "].complete" ; Et on attend qu'elle soit chargée While Not _FFCmd($imageCompleteQuery) WEnd Next EndFunc
  19. I'm trying to determine the latest/easiest/best way (as of May 2016) to control & interact with Firefox using Autoit. To the best I've been able to determine, there have been two different ways to do this. Once upon a time, there was something called "Mozilla ActiveX control", but given all the security warnings I receive whenever I try to download it (the original host site appears to be absent or invalid), I'd prefer to avoid it. The other approach is/was to use a UDF called "FF.au3" developed -- but apparently no longer supported for English speakers -- by Stilgar (old thread is here: https://www.autoitscript.com/forum/topic/95595-ffau3-v0601b-10/). The most recent thread I could find (in English) was started by Danp2 here: https://www.autoitscript.com/forum/topic/167661-ffau3-v0601b-15/ Although it certainly seems like using the FF UDF is the most recent and possibly only still-valid approach, getting anything sufficiently useful done with it strikes me as rather difficult, in part because the English documentation is so incomplete as to be unhelpful (and apparently incorrect as well), but also because it appears that to accomplish what I need to do might well require intimate knowledge of Firefox internals or APIs (maybe XULs too). For example, there are functions such as _FFCmd() that takes arbitrary/undocumented strings, and _FFGetValue() and_FFSetValue() with no English documentation at all (besides the minimal function descriptions in the FF.au3 file itself). So, my question is: What is the latest and/or easiest and/or best way of interacting with Firefox using Autoit? And what else do I need to learn first in order to use it effectively (such as Firefox developer APIs, etc)? Thanks!
  20. I'm trying to automate login on this site in the last few days, and I have to admit it drive me crazy. Seems like there is no solution. The site is rumah123 dot com Click on the "Login atau Daftar" link at top right screen. (I am using this code that work beautifully to click on that link): $oInput = _FFXPath('//*[@data-target="#LoginAgentModal"]') Sleep(250) _FFDispatchEvent($oInput, 'keypress', 13) A login form will displayed. The problem no matter what code I tried, it can not fill the "username" and "password" part. Tried these without success: _FFXPath('//input[@id="username"]') _FFCmd("FFau3.xpath.value='me@me.com'") _FFSetValue("me@me.com", "username", "id") _FFSetValue("$me@me.com", "username", "name") Tried also with SEND command, but the SEND command is very not reliable: sometime it works, sometime not: BlockInput(1) Sleep(500) WinActivate("[CLASS:MozillaWindowClass]", "") Sleep(50) For $a = 1 to 5 Sleep(50) Send("{TAB}") Next Sleep(50) Send($Username[1]) Sleep(50) Send("{TAB}") Sleep(50) Send($Password[1]) Sleep(50) Send("{TAB}") Sleep(50) Send("{SPACE}") BlockInput(0) Is there is any way to automate this kind of form/site using FF.AU3 ? Thanks a lot!
  21. Examples Is it possible for ff.au3 or Autoit to pause the script if Firefox crashes? The script I am working on opens and closes a series of random URLs taken from an array. If I close FF simulating a crash I get this error (taken from the SciTE log): __FFWaitForRepl ==> MozRepl Exception: !!! [Exception... "Failure" nsresult: "0x80004005 (NS_ERROR_FAILURE)" Or this, depending on when I close FF _FFCmd ==> Error return value .__FFSend ==> Error TCPSend / TCPRecv: TCPSend: try{FFau3.tmp=window.getBrowser().webProgress;FFau3.tmp.isLoadingDocument && FFau3.tmp.busyFlags ? false: true;}catch(e){'_FFCmd_Err';}; Or both, right in the order I reported them. Can you help me?
  22. Hi, all. I want to know how to send an email when FF.au3 got error. I have made in IE and it worked. But, FF cannot handle global error. Can you all help me? Thanks.
  23. Hi, everyone. I cannot press "Submit" image on Login website using FF.au3 #include <FF.au3> #include <FFex.au3> _FFStart() _FFOpenURL("https://url") _FFTabSetSelected() _FFSetValueByName("username") _FFSetValueByName("msisdn") _FFSetValueByName("password") Sleep(1000) _FFImageClick("visual/images/login-btn.png") I have been using IE.au3 with _IEFormImageClick($oIE, "visual/images/login-btn.png", "src") and it's successful. I want to use Firefox now because I got some error on IE like crash, etc. Can you all help me? Thanky ou.
  24. Hello. I need to execute this script var i; var select = document.getElementById("test"); for(i=1;i<select.options.length;i++) { select.options[i].selected=false; }Using autoit with FF.au3. I tried using it like - _FFCmd('var i;var select = document.getElementById("test");for(i=1;i<select.options.length;i++) { select.options[i].selected=false;}');But it doesn't work. _FFConnect: AutoIt: 3.3.14.1 _FFConnect: FF.au3: 0.6.0.1b-15 _FFConnect: IP: 127.0.0.1 _FFConnect: Port: 4242 _FFConnect: Delay: 2ms _FFConnect: Socket: 696 _FFConnect: Browser: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:42.0) Gecko/20100101 Firefox/42.0 __FFSendJavaScripts: Sending functions to FireFox .......... done __FFSend: try{var i;var select = document.getElementById("test");for(i=1;i<select.options.length;i++) { select.options[i].selected=false;}}catch(e){'_FFCmd_Err';}; __FFRecv: _FFCmd_ErrIf I paste it manually into firebug it works. I need to reset two selects inside a form on page but_FFFormReset() sometimes doesnt work for me. Thank you in advance and best regards
  25. I'm trying to simulate a click on a button using FireFox (FF.AU3), but no success in these last few days This is the source code of the page: <a href="#" class="btn btn-sm btn-green" id='superbutton' onclick="kickme(event,'ids11')" > <span class="icon"><i class="super-icon"></i></span> <span id='superbutton'>&nbsp; ClickMe</span> </a>Tried with no success: _FFClick("superbutton", "id")_FFClick("btn btn-sm btn-green", "class", 0)That "0" index also already replaced by other numbers (in order to do a try and error approach). The _FFLinkClick result below looks promising: _FFLinkClick("ClickMe", "text")__FFSend: FFau3.xpath=null;try{FFau3.xpath=FFau3.WCD.evaluate("//a[contains(.,'ClickMe')]",FFau3.WCD,null,XPathResult.FIRST_ORDERED_NODE_TYPE,null).singleNodeValue;}catch(e){'_FFXPath_Error: '+e;}; __FFRecv: http://thisistheweb.com/thepage# - {toString: function() {...}, target: "", download: "", ping: "", rel: "", relList: {...}, hreflang: "", ...} __FFSend: try{FFau3.simulateEvent(FFau3.xpath,'MouseEvents','click');}catch(e){'_FFCmd_Err';}; __FFRecv: 1 Seems it found the button and click it, but in fact: it doesn't. Or maybe it did click it, but the result is totally different with if I click the button manually. So... I'm thinking if I cant simulate a click on the button, I should execute the JavaScript onclick event. But... how? Thanks a lot
×