ZeroByDevide

Open Google chrome incongito

4 posts in this topic

#1 ·  Posted

I got some code from internet and i wanted to open a incongito browser and search my website but i cant seem to open google chrome in the incongito mode.

whenever i click to run my code it opens a tab in normal google chrome.

heres my code now:
 ShellExecute("chrome.exe", "http://www.erikzandstra.nl", "--incongito")

Share this post


Link to post
Share on other sites



#2 ·  Posted

$CMD = '"C:\Program Files (x86)\Google\Chrome\Application\chrome.exe"'&  ' /incognito http://www.google.com'
Run(@ComSpec & " /c " & $CMD,"", @SW_HIDE )

this works for me 
 

Share this post


Link to post
Share on other sites

#3 ·  Posted

Didn't work for me

used the exact code

only changed the path for chrome.exe

Share this post


Link to post
Share on other sites

#4 ·  Posted

i made a shortcut with the incoginito mode on it and linked the shortcut

got it working now :)

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.


Sign In Now

  • Similar Content

    • rootx
      Best way to use google image search? [SOLVED]
      By rootx
      I would like to download the first 5 images in a folder. THX.
      #include <INet.au3> #include <String.au3> #include <Array.au3> Global $sSource, $aImgURL, $sKeyWord $sKeyWord = "pug" $sSource = _INetGetSource("http://www.google.com/search?q=" & $sKeyWord & "&tbm=isch") $aImgURL = _StringBetween($sSource, 'src="', '"') For $x = 1 to UBound($aImgURL)-1 ConsoleWrite($aImgURL[$x]&@CRLF) Next  
    • Rhazz
      I can't activate the "File Open" window on Chrome and Edge
      By Rhazz
      Hi, I'm trying to upload a file with a web browser but I can't select the Open File window to select the file that I want to upload.
      TL;DR I can't handle the Open File window of Chrome and MS Edge. AutoIt just doesn't find it by its title (in Firefox yes, but not on Chrome and MS Edge).
      With another software (Selenium Webdriver in Python) I access to a web page with a common HTML5 file uploader and I click on it, but when the Open File window comes up, I want to select a file and press Enter (write the filepath that I give and press Enter key or Open button).
      I have the idea, and I have the script on AutoIt too... but it doesn't work on Windows Edge and Chrome, only works on Firefox and Pale Moon (who are basically the same).
      Here is my code:
      #include <MsgBoxConstants.au3> $title = "Abrir" ; My Windows is in spanish, but I guess it's "Open" in English and it's the same code WinActivate($title) If WinActive($title) Then send("C:\Users\myuser\images\my_image.jpg") Send("{ENTER}") Else MsgBox($MB_SYSTEMMODAL, "WinActive", "Window not found.") EndIf In Firefox (and Pale Moon) the Open File window comes up, the file path is written and the Enter key is pressed. It works perfect.
      In Chrome and Edge, I never see the Open File window on top... and I neither see "Window not found" message (seems like AutoIt finds it but doesn't send keys).
      Edit: before to send this post, I started thinking again and... after several tests, I discovered one thing: when you select the window, in Firefox (and Pale Moon) the cursor goes to the combobox (where I have to put the text) and it's possible to write just after clicking (or opening, what in AutoIt it is "Activate" I guess) the window but in Chrome and Edge it isn't like that, when you click the window, the cursor doesn't go to the combobox.
      With that "discovery", I tried to select the combobox but... I failed again. And now I have no idea how to go ahead.
      #include <MsgBoxConstants.au3> $title = "Abrir" WinActivate($title) If WinActive($title) Then ControlClick($title, "", 1148) ; Still it does not work send("C:\Users\myuser\images\my_image.jpg") Send("{ENTER}") Else MsgBox($MB_SYSTEMMODAL, "WinActive", "Window not found.") EndIf  
    • zxc3
      How to calculate the number of bytes read in the active window Chrome browser?
      By zxc3
      How to calculate the number of bytes read in the active window Chrome browser?
      This program counts the number of bytes on the Yahoo site after pressing the F8 key.
      But I need to be considered in the already open, the active window Chrome browser.
       
      #include <MsgBoxConstants.au3>
      HotKeySet("{F10}", "Terminate")
      HotKeySet("{F8}", "Example")
      ;;;; Body of program would go here ;;;;

      While 1
          Sleep(10000000)
      WEnd
      ;;;;;;;;

      Func Terminate()
          Exit 0
      EndFunc

      Func Example()
          ; Read the file without downloading to a folder. The option of 'get the file from the local cache' has been selected.
          Local $dData = InetRead("https://www.yahoo.com/")
          ; The number of bytes read is returned using the @extended macro.
          Local $iBytesRead = @extended
          ; Display the results.
          MsgBox($MB_SYSTEMMODAL, "", "The number of bytes read: " & $iBytesRead & @CRLF & @CRLF ) ;
      EndFunc   ;==>Example
       
       
    • zxc3
      Monitoring the text in the news box.
      By zxc3
      Prompt program, which monitors 1 word in the window Chrome browser - "super", a window title - "test", it need refreshes the window every five minutes, and if the word disappeared, beeps. This should not affect the work of other windows browser.
    • Reizvoller
      WinGetCaretPost and Google Chrome
      By Reizvoller
      Greetings!
      Func caretPlay () activateWindow () WinActivate ($workSpace) Local $myCaret = WinGetCaretPos () _ArrayDisplay ($myCaret) EndFunc Func activateWindow () $workSpace = WinGetHandle ("Login - Google Chrome") WinActivate ($workSpace) $dimensions = WinGetClientSize ($workSpace) $midPoint = $dimensions[1]/2 EndFunc Those are two little functions in a larger app I am building.  When I run the "caretPlay" function it returns the same values of 0,0 regardless of where I position the caret. I did read on the function reference page for WinGetCaretPos that applications with Multiple Document Interfaces (MDIs) may not return accurate values. I tried all three options for the CaretCoordMode option with no change in results.
      Either I am doing something wrong or Google Chrome isn't meant to work with this function. Any advice as to which it is?
      Thanks!