Announcement

Collapse
No announcement yet.

Web EXE path

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Web EXE path

    OK am stupid, or the search does not like me one or another, but I know this as been talked about so many times can some one please point me in the right place

    I need to get the true path of the EXE as I use the EXE as a game Launcher and well if I can't get the game right next to it in the same folder well it be little useless lol

    Sorry for dragging a old topic up but I have searched it and well got nothing

    Just to make it clear I want the EXE's path not the autoplay.exe's path I know I done this before I just can't thing how.

    local path = _CommandLineArgs[Table.Count(_CommandLineArgs)];

    This didn't work what I read else where.
    Plugins or Sources MokoX
    BunnyHop Here

  • #2
    Code:
    local function GetSourceExe()
    	local path = _SourceFolder; --default
    	if (_CommandLineArgs and Table.Count(_CommandLineArgs) >=1) then
    		--target: 'SFXSource:' 10 chars +1		
    		for k,v in ipairs(_CommandLineArgs) do	
    			if String.Lower(String.Mid(v, 1, 10)) == 'sfxsource:' then
    				path = String.Mid(v, 11, -1); break;
    			end	
    		end
    	end
    	return path; 
    end
    --call it:
    local sMyWebexe = GetSourceExe();
    Dialog.Message('where the **** is it ?????',tostring(sMyWebexe));

    Comment


    • #3
      Originally posted by Eagle View Post
      Code:
      local function GetSourceExe()
      	local path = _SourceFolder; --default
      	if (_CommandLineArgs and Table.Count(_CommandLineArgs) >=1) then
      		--target: 'SFXSource:' 10 chars +1		
      		for k,v in ipairs(_CommandLineArgs) do	
      			if String.Lower(String.Mid(v, 1, 10)) == 'sfxsource:' then
      				path = String.Mid(v, 11, -1); break;
      			end	
      		end
      	end
      	return path; 
      end
      --call it:
      local sMyWebexe = GetSourceExe();
      Dialog.Message('where the **** is it ?????',tostring(sMyWebexe));

      I will give that a go thanks.
      Plugins or Sources MokoX
      BunnyHop Here

      Comment

      Working...
      X