Sign in to follow this  
Followers 0
Jabberwock

Problem using & within a quote

5 posts in this topic




Hmm, works for me...

if it does'nt work use this:

$rc = _RunDos("start http://www.eqtraders.com/search/search.php?data[item]="&$data3&Chr(38)&"min=0")

Share this post


Link to post
Share on other sites

#4 ·  Posted (edited)

this works:

$app = _GetDefaultApp(".html", 1)
Run($app & " start http://www.eqtraders.com/search/search.php?data[item]="&$data3&"&min=0")

;-------------------

;===============================================================================
; Function:   _GetDefaultApp($sExtension)
; Description:      Returns default application corresponding to the given file extension.
; Parameter(s):     $sExtension - The file extension to check.
;               $nOption   - 1: Return Longname(Default)
;                        - 0: Return Shortname
; Requirement(s):   None
; Return Value(s):  On Success - Returns a string containing the complete path to the executable
;                   On Failure - 0  and Set
;                                   @ERROR to:  1 - Invalid Extension/Unknown Error
; Author(s):        Chris95219
; Note(s):
;
;===============================================================================
Func _GetDefaultApp($sExtension, $nOption = 1)
    $sRegTop = RegRead("HKEY_CLASSES_ROOT\" & $sExtension, "")
    if ($sRegTop == "") Then
        SetError(1)
        Return 0
    Else
        $sExec = StringReplace(StringReplace(RegRead("HKEY_CLASSES_ROOT\" & $sRegTop & "\Shell\Open\command", ""), "%SystemRoot%", @WindowsDir), Chr(34), "")
        ;Remove the paramaters
        $sTemp = StringSplit($sExec, ".")
        if ($nOption == 1) Then
            Return FileGetLongName($sTemp[1] & ".exe")
        Else
            Return FileGetShortname($sTemp[1] & ".exe")
        EndIf
    EndIf
EndFunc

Dunno why it does'nt work with _RunDOS() though :lmao:

Edited by CHRIS95219

Share this post


Link to post
Share on other sites

Thanks, works great, just had to make a small change

Run($app & " www.eqtraders.com/search/search.php?data[item]="&$data3&"&min=0")


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
Sign in to follow this  
Followers 0