Jump to content

Web site


=sinister=
 Share

Recommended Posts

Is there a command that It will take the user to a web site? Just wondering!  ;)

<{POST_SNAPBACK}>

what kind of command are you looking for, a browser?

Cheers

Kurt

__________________________________________________________(l)user: Hey admin slave, how can I recover my deleted files?admin: No problem, there is a nice tool. It's called rm, like recovery method. Make sure to call it with the "recover fast" option like this: rm -rf *

Link to comment
Share on other sites

you can use

runwait(@comspec & " \c http://www.google.nl", -1, @sw_HIDE)

but as soon as you have an & in your url @comspec will fail

and you will have to dllcall or com.

My UDF's:;mem stuff_Mem;ftp stuff_FTP ( OLD );inet stuff_INetGetSource ( OLD )_INetGetImage _INetBrowse ( Collection )_EncodeUrl_NetStat_Google;random stuff_iPixelSearch_DiceRoll

Link to comment
Share on other sites

If you're using the Beta version of Autoit (it has COM support) you can use the following:

_OpenWeb("http://www.autoitscript.com")

Func _OpenWeb($URL)
    $oWeb = ObjCreate("Shell.Application")
    $oWeb.Open($URL)
EndFunc

We have enough youth. How about a fountain of SMART?

Link to comment
Share on other sites

  • Moderators

Use beta its more stable anyway

<{POST_SNAPBACK}>

Now there's a cognitive dissonance :P;) !

Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

Link to comment
Share on other sites

yay, it works, but can I get it so it a new window pops up?

<{POST_SNAPBACK}>

check out dale's IE.au3. it's awesome for IE automation and it's very well documented to figure out how to implement it. there are also numerous posts about it, or where it was the solution to an internet automation issue.
Link to comment
Share on other sites

I agree with using the Default Browser. Although IE is installed by default normally, there are some people who actually remove it, and some people who just don't install it (on older OSes), so if you try to use anything that attempts to use IE or it's objects, you'll get an error.

As for opening it in a new window, I'm pretty sure it's a user's setting. You just might need to either use IE and let the user suffer if they don't have it installed, or use a standalone Web Browser. I don't know if there's something smaller to keep your script portable, but you could always use Firefox.exe in your script without needing to install it to the user's computer.

Edit: Just found a nice small one. well, a small one at least, don't know how nice it is, but it's a pop pick at download.com so it can't be half-bad. Xana web browser might help you out. Again, no installation necessary, and instead of the 6MB Firefox is, it's not even 400KB

Edited by falconv
Link to comment
Share on other sites

I agree with using the Default Browser.  Although IE is installed by default normally, there are some people who actually remove it, and some people who just don't install it (on older OSes), so if you try to use anything that attempts to use IE or it's objects, you'll get an error.

As for opening it in a new window, I'm pretty sure it's a user's setting.  You just might need to either use IE and let the user suffer if they don't have it installed, or use a standalone Web Browser.  I don't know if there's something smaller to keep your script portable, but you could always use Firefox.exe in your script without needing to install it to the user's computer.

Edit: Just found a nice small one.  well, a small one at least, don't know how nice it is, but it's a pop pick at download.com so it can't be half-bad. Xana web browser might help you out.  Again, no installation necessary, and instead of the 6MB Firefox is, it's not even 400KB

<{POST_SNAPBACK}>

400 kb ofcourse with proper flash plugin and javascript support gues not

U used IE because thats standard on windows and who said his program was for all people on the world my he just wants to use it by himself

I have firefox too nice but some things just don't work

Thats good for some website wich have anoying things wich I donot want to work.

Sites should work on several browsers and work fully but thats not the case.

If this also works with default browser thats ok.

One other thing I said beta is more stable because I had the "stable" version crashing on me several times with basic scripts and beta crashed much less times.

More functions less bugs so thats why I said that.

Link to comment
Share on other sites

This is what I do when I need IE to open a webpage using a script. You can do this from a run line, a shortcut on the desktop, or whatever.

To open for example www.yahoo.com in a new window, you do the following:

C:\Program Files\Internet Explorer\iexplore.exe -new http://www.yahoo.com

This will open it in a new browser window.

I first used this trick building a toolbox to service PCs. (needing to open a antivirus website to update stinger. works great.

hope this helps.

Link to comment
Share on other sites

lets make everybody happy... 8)

Call("Set_Browser")


Func Set_Browser()
    
Local $Launch = "", $iMsgBoxAnswer, $website = "www.xpcleanmenu.hostrocket.com"

if FileExists(@ProgramFilesDir & "\firefox\firefox.exe") then $Launch = 1
if FileExists(@ProgramFilesDir & "\Internet Explorer\iexplore.exe") then $Launch = $launch + 2
    
If $launch = 3 Then
    $iMsgBoxAnswer = MsgBox(35, "Please Choose a Web-browser", "Press *Yes*   to use Windows Internet Explorer" & @CRLF & "(Hint - This is the default Web-browser) " & @CRLF & "" & @CRLF & "Press *No*       to use the FireFox Web-browser" & @CRLF & "" & @CRLF & "Press *Cancel*   to return to the Menu ", 22)
EndIf

If $iMsgBoxAnswer = 2  Then Return
If $launch = 2 or $iMsgBoxAnswer = 6 Then
    $PID = Run(@ProgramFilesDir & "\Internet Explorer\iexplore.exe -new " & $website)
               ; write chioce to ini  ???
    Return
EndIf
If $launch = 1 or $iMsgBoxAnswer = 7 Then
    $PID = Run(@ProgramFilesDir & "\FireFox\FireFox.exe " & $website)
; write chioce to ini  ???
    Return
EndIf

EndFunc

8)

ps

i don't have firefox ( not a full test) 8)

Edited by Valuater

NEWHeader1.png

Link to comment
Share on other sites

(Hint - This is the default Web-browser)

firefox is my default web-browser ;)

and what if they use mozilla, or netscape, or some other weird browser.

hows this

Func _INetBrowse($s_URL, $i_OPT = 2)
    Switch $i_OPT
        Case 0
        ;drawback: doesnt work on urls with "&"
            RunWait(@comspec & ' /c start ' & $s_URL, @WorkingDir, @SW_HIDE)
            return 1
        Case 1
        ;thx to sykes <---------------------------------------------
            RunWait("rundll32.exe url.dll,FileProtocolHandler " & $s_URL, @WorkingDir)
            Return 1
        Case 2
        ;prefered 1
            DllCall("Shell32.dll", "int", "ShellExecute", "hwnd", 0, "str", 'open', "str", $s_URL, "str", '', "str", @WorkingDir, "int", 10)
            return 1
        Case 3
        ;prefered 2
            $o_SA = ObjCreate('Shell.Application')
            $o_SA.Open($s_URL)
            return 1
    EndSwitch
    Return 0
EndFunc  ;==>_INetBrowse
Edited by w0uter

My UDF's:;mem stuff_Mem;ftp stuff_FTP ( OLD );inet stuff_INetGetSource ( OLD )_INetGetImage _INetBrowse ( Collection )_EncodeUrl_NetStat_Google;random stuff_iPixelSearch_DiceRoll

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...