Thread: Compile and run .bat from command.

Results 1 to 5 of 5
  1. #1 Compile and run .bat from command. 
    Donator

    Join Date
    Aug 2014
    Posts
    13
    Thanks given
    0
    Thanks received
    0
    Rep Power
    11
    I'd like to know if its possible to run a .bat from a command.

    So from a ::restart, or maybe ::compile.
    Thanks!
    Reply With Quote  
     

  2. #2  
    Legit on RuneScape!
    Scott Aid's Avatar
    Join Date
    Sep 2014
    Posts
    50
    Thanks given
    1
    Thanks received
    4
    Rep Power
    26
    Never seen it done but i'm sure it maybe possible.
    Reply With Quote  
     

  3. #3  
    anInt69

    Max _'s Avatar
    Join Date
    Feb 2012
    Age
    26
    Posts
    1,801
    Thanks given
    426
    Thanks received
    727
    Rep Power
    599
    For restarting, it's possible, here's the command:
    Code:
    if (playerCommand.equalsIgnoreCase("restart")) {
    			for (Player p : PlayerHandler.players) {
    				if (p == null)
    					continue;
    				if (p.inTrade) {
    					((Client) p).getTradeAndDuel().declineTrade();
    					System.out.println(p.playerName
    							+ " was trading and has just been saved :)");
    				}
    				PlayerSave.saveGame((Client) p);
    				System.out.println("Saved game for " + p.playerName + ".");
    			}
    			System.exit(0);
    		}
    As for compiling, it should be possibly with executing a method that would run a batch file on the source. Not 100% sure.
    Reply With Quote  
     

  4. #4  
    Donator

    Join Date
    Aug 2014
    Posts
    13
    Thanks given
    0
    Thanks received
    0
    Rep Power
    11
    Quote Originally Posted by MaxiiPad View Post
    For restarting, it's possible, here's the command:
    Code:
    if (playerCommand.equalsIgnoreCase("restart")) {
    			for (Player p : PlayerHandler.players) {
    				if (p == null)
    					continue;
    				if (p.inTrade) {
    					((Client) p).getTradeAndDuel().declineTrade();
    					System.out.println(p.playerName
    							+ " was trading and has just been saved :)");
    				}
    				PlayerSave.saveGame((Client) p);
    				System.out.println("Saved game for " + p.playerName + ".");
    			}
    			System.exit(0);
    		}
    As for compiling, it should be possibly with executing a method that would run a batch file on the source. Not 100% sure.
    if (playerCommand.equalsIgnoreCase("restart")) {
    for (Player p : PlayerHandler.players) {
    if (p == null)
    continue;
    if (p.inTrade) {
    ((Client) p).getTradeAndDuel().declineTrade();
    System.out.println(p.playerName
    + " was trading and has just been saved ");
    }
    PlayerSave.saveGame((Client) p);
    System.out.println("Saved game for " + p.playerName + ".");
    }
    System.exit(0);
    }


    I'm sorry, but i'm asking it to reopen the .bat when it shutdown.
    Reply With Quote  
     

  5. #5  
    Donator

    Join Date
    Aug 2014
    Posts
    13
    Thanks given
    0
    Thanks received
    0
    Rep Power
    11
    Still looking for help
    Reply With Quote  
     


Thread Information
Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)


User Tag List

Similar Threads

  1. Compiler and Run.bat
    By EmperorShanksz in forum Help
    Replies: 15
    Last Post: 12-18-2012, 11:46 PM
  2. compiler and run.bat help please
    By SayfertRsps in forum Help
    Replies: 2
    Last Post: 11-20-2011, 12:44 AM
  3. Pja/hyperion Compiler.bat and run.bat
    By Haskell Curry in forum Configuration
    Replies: 19
    Last Post: 04-24-2011, 07:31 AM
  4. compile.bat and run.bat for Hyperion
    By Armo in forum Snippets
    Replies: 3
    Last Post: 08-13-2010, 07:59 PM
  5. Replies: 17
    Last Post: 08-14-2009, 09:38 PM
Posting Permissions
  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •