OGame Redesign: Keyboard Shortcuts

By Vess Last update Dec 14, 2012 — Installed 288,317 times.

New function

in
Subscribe to New function 9 posts, 3 voices



mohace Scriptwright
FirefoxWindows

Could it be possible in message window when focus is in any message checkbox (doesn't matter if checked or not) when "enter" key pressed all checked messages would be deleted.

 
Etintos Scriptwright
FirefoxWindows

hello friend, I have a suggestion for your script.

to press the shift key plus the number of the planet, to change from one to another. example: I'm on the planet 5 and press Shift + 1.

you think about this? I await your comments.

 
Vess Script's Author
FirefoxWindows

mohace, I don't understand what you want. Are you talking about the mailbox? There is no focus there and the Del key already deletes all the checked messages there. Or are you talking about the opened message pseudo-window? It covers the mailbox - it would be dangerous to delete all the checked messages because you won't be seeing what would be deleted. Not to mention that I'm not quite sure if the script can delete stuff in the parent frame just like that... No, it's messy; I won't do it.

Etintos, what you want is easy to do - but what if the player has more than 10 planets? ;) Also, the Shift-N keys are already used on the second and third fleet pages (for setting the fleet speed and the expedition holding time, respectively), so the planet changing function won't work on these pages anyway.

 
mohace Scriptwright
FirefoxWindows

Edited: I have readed your answer again. Can you do the same that Del key also with Enter key in mailbox? If you coud keep both key with that function, enter button placed in the mouse will do the same (delete all checked messages) in the more confortable possible way.

 
mohace Scriptwright
FirefoxWindows

I added to your script the following code and it works.
Now I can delete all checked messages just pressing the button under my thumb!!

case 13: // Enter
if (e.shiftKey || e.ctrlKey || e.altKey)
break;
if (theHref.indexOf ("/game/index.php?page=messages") > -1)
{
unsafe.mod = 7;
$ (".buttonOK").click ();
return false;
}
break;

 
Vess Script's Author
FirefoxWindows

But the Del key already does exactly this. If you want to delete the marked messages with the Enter key instead of with the Del key, there is no need to repeat the whole code; just change the second occurrence of

case 46: // Del

with

case 13: // Enter

Or just add the above line after that, if you want both keys to delete the marked messages.

 
mohace Scriptwright
FirefoxWindows

After case 46, I added, in case 13, the same code as the first one.
I don't know if it is the better way, but it is working now. Maybe you would want add this change in another future update.
Thank you, anyway. This is an awesome script!

 
Vess Script's Author
FirefoxWindows

What I meant was that, if you want the Del and the Enter keys to do one and the same thing, then instead of duplicating the code like this:

case 46:	// Del
	if (e.shiftKey || e.ctrlKey || e.altKey)
		break;
	if (theHref.indexOf ("/game/index.php?page=messages") > -1)
	{
		unsafe.mod = 7;
		$ (".buttonOK").click ();
		return false;
	}
	break;
case 13:	// Enter
	if (e.shiftKey || e.ctrlKey || e.altKey)
		break;
	if (theHref.indexOf ("/game/index.php?page=messages") > -1)
	{
		unsafe.mod = 7;
		$ (".buttonOK").click ();
		return false;
	}
	break;

you should do just this:

case 46:	// Del
case 13:	// Enter
	if (e.shiftKey || e.ctrlKey || e.altKey)
		break;
	if (theHref.indexOf ("/game/index.php?page=messages") > -1)
	{
		unsafe.mod = 7;
		$ (".buttonOK").click ();
		return false;
	}
	break;

I don't intend to do this in the "official" version of the script, though. I still think that the Enter key shouldn't delete marked messages.

 
mohace Scriptwright
FirefoxWindows

Vess I think that if you want to help people, maybe you could to do this with the official version as it could help many people as me, that have an enter button in the mouse. Certainly, maybe you can“t figure how much more confortable is delete all checked messages with that button. Of course, what you do with your script is your own decision. But, as you can see, that change doesn't interfere with anything.
I can change that unique line in each one of your updates, but, could do that other people? Why you post your script here, is for help as many users as possible, or not?
Thanks for your reply. See you.

Edited: I am playing ogame, just now, on my laptop. Here it is a lot much better press return button than delete one. The first one is a big button, the last is a small one. Also I have the Stroke It mouse gestures program (as many other people could), and with the "enter" key asigned to a button combination the messages checked are deleted in an easy and more confortable way.