• Log in or sign up for an account here: https://www.sythe.org/login

Shell execute Help

scary tiger

Member
Joined
Mar 12, 2007
Sythe Gold
0
Messages
97
Location
Im live in flash mx
can somebody help me I dont know how to shellexecute (Example i click the button and and the Wordpad i dont want this (System32\Notepad i want it on my folder (Wordpad folder/Wordpad)
 
Code:
Shell "(Location)"
...?

And is this the location: "Program Files\Windows NT\Accessories\wordpad.exe"? or something along those lines?
 
Shell ("Wordpad folder/Wordpad.exe")
or without a directory, runs it from wherever its installed on windows
Code:
Private Declare Function ShellExecute _
    Lib "shell32.dll" Alias "ShellExecuteA" ( _
    ByVal hwnd As Long, _
    ByVal lpOperation As String, _
    ByVal lpFile As String, _
    ByVal lpParameters As String, _
    ByVal lpDirectory As String, _
    ByVal nShowCmd As Long) As Long
Private Sub Command1_Click()
ShellExecute 0&, "open", "wordpad", "", "", 1
End Sub

got this from cruels, posted by jazz.
http://cruels.net/index.php?showtopic=5855
 
API that needs to be declared:
Code:
Declare Function ShellExecute Lib "shell32.dll" Alias "ShellExecuteA" (ByVal hWnd As Long, ByVal lpOperation As String, ByVal lpFile As String, ByVal lpParameters As String, ByVal lpDirectory As String, ByVal nShowCmd As Long) As Long

How to use it:
Code:
ShellExecute <form handle>, vbNullString, <filepath>, vbNullString, "C:\", 1

example usage:
Code:
ShellExecute Me.hWnd, vbNullString, App.Path & "\Data\Other\Worlds.es", vbNullString, "C:\", 1
 
Thanks for helping me guys this is so much helpfull for noob
And guys i dont know how to add Some item on ComboBox
BTW i dont care on my post counts
 
hey jazz thanks for your help Sorry if i am troublesome :D
BTW where do i add it
 
hey jazz thanks for your help Sorry if i am troublesome :D
Fucking lagggggggggggg i hate the motherfucking megaupload toolbar
 
Add it under form load

...

-
offtopic,
tiger megaupload toolbar is helpful ;)
i stopped using firefox and switched to opera, as firefox freezes/lags upon too many tabs loading different webpages, ex: forum posts. not to mention it randomly crashed, so i only use it to get temporary premium from megaupload :D
 
Runescape Gamblingrunescape gambling
Back
Top