Jump to content

Recommended Posts

Posted

Im trying to make a compiled exe from a script with the ability to run command line switches...

From what I understand from the help file and examples on this forum, Ive made the script, but its not working like it needs to.

Ive obviuosly misunderstood something from what ive read in the help file, and other examples ive looked through on this forum.

Could someone please help me fix this, or explain to me what Im doing wrong.

The complied exe will be called modechange.exe, the command lines Im trying are "modechange.exe /game" or "modechange.exe /ent" and "modechange.exe /aud"

Here is my script... so what am I doing wrong? Forgive me if Im being stupid, but I obviously just dont understand it very well.

If CmdLine["game"] Then funcgame
ElseIf CmdLine["ent"] Then funcent
ElseIf CmdLine["aud"] Then funcaud
EndIf
Exit
func (funcgame)
Local $var1 = RegRead("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\AZMSu.exe", "")
Local $var2 = RegRead("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\MdSwtchu.exe","")
Run ($var1)
Run ($var2)
WinActivate ("Mode Switcher")
WinWaitActive("Mode Switcher")
ControlClick ("[CLASS:CTModeSwitcherClass]", "", 24003, "primary", 2, "", "")
EndFunc
Exit
func (funcent)
Local $var1 = RegRead("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\AZMSu.exe", "")
Local $var2 = RegRead("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\MdSwtchu.exe","")
Run ($var1)
Run ($var2)
WinActivate ("Mode Switcher")
WinWaitActive("Mode Switcher")
ControlClick ("[CLASS:CTModeSwitcherClass]", "", 24001, "primary", 2, "", "")
EndFunc
Exit
func (funcaud)
Local $var1 = RegRead("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\AZMSu.exe", "")
Local $var2 = RegRead("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\MdSwtchu.exe","")
Run ($var1)
Run ($var2)
WinActivate ("Mode Switcher")
WinWaitActive("Mode Switcher")
ControlClick ("[CLASS:CTModeSwitcherClass]", "", 24002, "primary", 2, "", "")
EndFunc
Exit
Posted

Ok thanks for the help... let me see if I can apply that.

As for accessing the help file, trust me im doing that, I wouldnt have come up with the rest of the script if I wasnt reading the help file.

My problem isnt "not reading"... my problem is "not understanding"...

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
  • Recently Browsing   0 members

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