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

Help!

SuF

Legend
Joined
Jan 21, 2007
Sythe Gold
1,234
Messages
14,211
Help!
well i was making n auto seller and i was trying to get it to work with GUI...

when i call the things that are the auto seller it messes up... the way i made it work on my other programs is throws Exception
after many many things.... but itw won'twork help plz
Code:
import javax.swing.*;
import java.awt.*;
import java.awt.event.*;
import java.util.Scanner;

@SuppressWarnings("serial")
public class ClickMe 
    extends JFrame implements ActionListener 
{
	static boolean stop = true;
	static Scanner sc = new Scanner(System.in);
	static boolean con = true;
	public static void main(String [] args)throws Exception
	{
		
			new ClickMe();
			
	}

	private JButton help, step2, step3, step4, start;
	private JTextField items;
	public ClickMe()
	{	
	    this.setSize(400,200);
	    this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
	    this.setTitle("SuF's Auto Seller");
	    this.setLocationRelativeTo(null);
	    
	    JPanel panel1 = new JPanel();
		
	    help = new JButton("Step 1");
		help.addActionListener(this);
	    panel1.add(help);
	    
	    step2 = new JButton("Step 2");
		step2.addActionListener(this);
	    panel1.add(step2);
	    
	    step3 = new JButton("Step 3");
		step3.addActionListener(this);
	    panel1.add(step3);
	    
	    step4 = new JButton("Step 4");
		step4.addActionListener(this);
	    panel1.add(step4);
	 
	    panel1.add(new JLabel("Enter How Many Items You Want Sold"));
	    
	    items = new JTextField(15);
	    panel1.add(items);
	    
	    start = new JButton("Star");
	    start.addActionListener(this);
	    panel1.add(start);
	    
	    this.add(panel1);
	    this.setVisible(true);
	}
	   
	
	
	

	public void actionPerformed(ActionEvent e)
	{
		int g = Integer.parseInt(items.getText());
		if (e.getSource() == help)
		{
			JOptionPane.showMessageDialog(ClickMe.this,"Put the item you want to sell in the bottom row second place in. " ,
			"Step 1", JOptionPane.INFORMATION_MESSAGE);
				    
		}
		if (e.getSource() == step2)
		{
			JOptionPane.showMessageDialog(ClickMe.this,"Make sure EliteShift is open and maximized and that you can see the top bar of EliteShift. " ,
			"Step 1", JOptionPane.INFORMATION_MESSAGE);
				    
		}
	
		if (e.getSource() == step3)
		{
			JOptionPane.showMessageDialog(ClickMe.this,"Put in the amount of items you have to sell. You will login when done." ,
			"Step 1", JOptionPane.INFORMATION_MESSAGE);
				    
		}
		
		if (e.getSource() == step4)
		{
			JOptionPane.showMessageDialog(ClickMe.this,"Set your mouse type to one butten. Open up the store trade window and hit start." ,
			"Step 1", JOptionPane.INFORMATION_MESSAGE);
				    
		}
	
		if (e.getSource() == start)
		{
			int j = Integer.parseInt(items.getText());		
			double d = j / 10;
			for(int c = 0; c < d; c++)
			{
				getrs();
				autoclicker();
				autoclicker();
			}
			
		}
		
	
	}	
					
			
			public static void autoclicker() throws Exception
			{
				int low = 100;
				int high = 300;
				int a = (int)(Math.random() * (high - low + 1)) + low;
				
					Robot auto = new Robot();
						{
							int x = 613;
							int y = 496;
							auto.mouseMove(x,y);
							auto.mousePress(InputEvent.BUTTON1_MASK);
							auto.mouseRelease(InputEvent.BUTTON1_MASK);
							auto.delay(a);
						} 
			}
			
						public static void getrs() throws Exception
						{
							while(con)
							{
			
								Robot move = new Robot();
								{
									int x = 607;
									int y = 9;
									move.mouseMove(x,y);
									move.mousePress(InputEvent.BUTTON1_MASK);
									move.mouseRelease(InputEvent.BUTTON1_MASK);
								}
								con = false;
							}
						}
	
}
 
Runescape Gamblingrunescape gambling
Back
Top