Here is the code:
Code: Select all
// [0] = name
// [1] = location
// [2] = subName
import java.io.*;
public class ELA{
public static void main(String args[]){
//replace location with coresponding file location from local host.
//NOTE: the final '/' is needed.
String location = "C://Users/ian/Documents/Rainmeter/Skins/Enigma/Taskbar/Launcher/";
//----------------------------------------------------------------------------------------
// create new directory and file.
//----------------------------------------------------------------------------------------
//new directory
File directory = new File(
location + args[0]);
try{
directory.mkdir();
}
catch(SecurityException e){
System.err.println("well shit.");
}
//new file
File newFile = new File(location + args[0] + "/" + args[0] + ".ini");
try{
newFile.createNewFile();
}
catch(IOException e){
System.err.println("file didn't get created");
}
//----------------------------------------------------------------------------------------
// write to new file.
//----------------------------------------------------------------------------------------
PrintWriter out = null;
try{
out = new PrintWriter(new FileWriter(location + args[0] + "/" + args[0] + ".ini"));
out.println("[Variables]");
out.println("@include=#@#User\\Options.inc");
out.println("@include2=#@#Styles\\#Stylesheet#\\Options.inc");
out.println("@include3=#@#Styles\\#Stylesheet#\\TaskbarCommon.inc");
out.println("@include4=#ROOTCONFIGPATH#Taskbar\\Launcher\\Launcher.inc");
out.println("App=" + args[0]);
out.println("AppPath=" + args[1]);
out.println("AppPathHandle=");
out.println("AppLabel=" + args[2]);
out.println("AppIcon =");
out.println("Variant=Mini");
out.flush();
out.close();
}
catch(IOException e){
System.out.println("error writing to file");
}
}
}
http://imgur.com/FNaMMDS
simple instructions:
1. compile java file.
2. run java file with specific params. An example of this would be if I wanted to create the launcher on the top left of my imgur link. I would type in:
java ELA Chrome "file location for chome.exe" APP
first param is the name of the launcher, second is where it is located in memory, third is the sub name thing for it.
3. You need to prompt rainmeter to refresh its known skins. (either refresh in manager or restart rainmeter)
P.S. If someone wants to convert this to an executable that would be awesome I acctually don't know how to do this and don't feel like looking it up.