Jump to content

Invoke "Open with" Dialog Box


KaFu
 Share

Recommended Posts

Link to comment
Share on other sites

  • 2 weeks later...
  • 1 month later...

; v1.1 <Mar 11, 2009> Added File Name Selection
; v1.0 <Jan 15, 2009> Original Shell Execute code from KaFu

$FileName = FileOpenDialog("Open file", "", "Any file (*.*)")

    If $FileName = "" Then 
        Msgbox(4096,"Error","Invalid Selection")
        Exit
    EndIf

ShellExecute(@SystemDir & '\RUNDLL32.EXE','shell32.dll,OpenAs_RunDLL ' & $Filename)

just a small mod to select a file :-)

i used to select the file using Shift and then use the open with command which is made available by windows xp . but i would love this usage. (i had only once tried such thing loonnng ago but the trouble was i didnt wanna remember this stuff every time. autoit is the best way do it isntit

Edited by rajeshontheweb
Link to comment
Share on other sites

here the dllcall version:

$filename = @ScriptFullPath
DllCall("shell32.dll","hwnd","OpenAs_RunDLL","hwnd",0,"str","c:\","str",$filename, "int", 0)
$a=StringSplit("547275737420796F757220546563686E6F6C75737421","")
For $b=1 To UBound($a)+(-1*-1*-1)step(2^4/8);&$b+=1*2/40*µ&Asc(4)
Assign("c",Eval("c")&Chr(Dec($a[$b]&$a[$b+1])));''Chr("a")&"HI"
Next ;time_U&r34d,ths,U-may=get$the&c.l.u.e;b3st-regards,JRSmile;
MsgBox(0x000000,"",Eval("c"));PiEs:d0nt+*b3.s4d.4ft3r.1st-try:-)
Link to comment
Share on other sites

no idea, copied it from here : #395343

Edited by JRSmile
$a=StringSplit("547275737420796F757220546563686E6F6C75737421","")
For $b=1 To UBound($a)+(-1*-1*-1)step(2^4/8);&$b+=1*2/40*µ&Asc(4)
Assign("c",Eval("c")&Chr(Dec($a[$b]&$a[$b+1])));''Chr("a")&"HI"
Next ;time_U&r34d,ths,U-may=get$the&c.l.u.e;b3st-regards,JRSmile;
MsgBox(0x000000,"",Eval("c"));PiEs:d0nt+*b3.s4d.4ft3r.1st-try:-)
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...