Jump to content
Sign in to follow this  
KaFu

Invoke "Open with" Dialog Box

Recommended Posts

KaFu

An even smaller example I searched for to use in SMF :)....

$filename = 'test.ini'
ShellExecute(@SystemDir & '\RUNDLL32.EXE','shell32.dll,OpenAs_RunDLL ' & $filename)

Best Regards

Share this post


Link to post
Share on other sites
trancexx

Nice.

Though, I have trouble understanding why would you use RUNDLL32.EXE to call that function from shell32.dll.

Autoit is DllCall() capable -to say it that way.


♡♡♡

.

eMyvnE

Share this post


Link to post
Share on other sites
KaFu

Autoit is DllCall() capable -to say it that way.

True, didn't thought about that :), it was just an msdn example using shellexecute i adjusted to use with au...

Share this post


Link to post
Share on other sites
rajeshontheweb

; 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

Share this post


Link to post
Share on other sites
JRSmile

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:-)

Share this post


Link to post
Share on other sites
rajeshontheweb
JRSmile

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:-)

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  

×