$interface for Blinking TaskBar

This section is created for developers and non-developers who think that he/she has a good (and realistic) idea that might contribute to the OpenKore community.

Moderator: Moderators

Message
Author
Chontrad
Human
Human
Posts: 30
Joined: 23 Apr 2008, 10:11
Noob?: No
Location: Indonesia TANAH AIRKU
Contact:

$interface for Blinking TaskBar

#1 Post by Chontrad »

I think a $interface containing beep,blink taskbar,and steal focus. Will be very GREAT for making some plugins, which needs your attention on somethin.

sli
Perl Monk
Perl Monk
Posts: 810
Joined: 04 Apr 2008, 17:26
Noob?: No

Re: $interface for Blinking TaskBar

#2 Post by sli »

You can already add those sorts of things with a plugin. Sooo... not sure what you want.
cs : ee : realist

Chontrad
Human
Human
Posts: 30
Joined: 23 Apr 2008, 10:11
Noob?: No
Location: Indonesia TANAH AIRKU
Contact:

Re: $interface for Blinking TaskBar

#3 Post by Chontrad »

Sooo.... I don't understand....
How could i add those with Plugins????? I don't find any Perl function to do that.

sli
Perl Monk
Perl Monk
Posts: 810
Joined: 04 Apr 2008, 17:26
Noob?: No

Re: $interface for Blinking TaskBar

#4 Post by sli »

Various Win32 functions.
cs : ee : realist

iamanoob
Plain Yogurt
Plain Yogurt
Posts: 82
Joined: 04 Apr 2008, 09:49

Re: $interface for Blinking TaskBar

#5 Post by iamanoob »

sub focusRO {
if ($conState == 5) {
my @windows = FindWindowLike(0,"$char->{name}");
foreach (@windows) {
SetForegroundWindow($_);
}
}
return;
}

i saw it here in the old plugin forums
http://bibian.ath.cx/openkore/viewtopic.php?t=25518


but the link was broken, so ive looked on my OLDOLD openkore and this is
rowarn.pl

Code: Select all

#Fixed to 1.9.x series
#put following in timeout.txt
#warnrepeat 2
#and set up options in config.txt
#warn_pm 1 to warn against PMs
#warn_pc 1 to warn against any players
#warn_sound 1 to warn using sound
#warn_focus 1 to warn using focusing on RO window


package rowarn;

use strict;
use Plugins;
use Globals;
use Misc;
use Utils;

use Win32::GuiTest;
use Win32::GuiTest qw(FindWindowLike GetWindowText SetForegroundWindow);


Plugins::register('rowan', 'warning from PM and other players', \&Unload);

my $hooks = Plugins::addHooks(
	['packet_privMsg', \&processPM, undef],
    ['AI_pre', \&detectPlayers, undef]
);


sub Unload {
	Plugins::delHooks($hooks);
}

sub focusRO {
		if ($config{'warn_focus'}) {
    	my @windows = FindWindowLike(0, "^Ragnarok");
   		foreach (@windows) {
   			SetForegroundWindow($_);
    	}
		}
}

sub soundRO {
		if ($config{'warn_sound'}) {$interface->beep()}
}

sub processPM {
	if (	$config{'warn_pm'}) {
		soundRO;
		focusRO;
	}
}

sub detectPlayers {
	if (	$config{'warn_pc'}) {
		if (binSize(\@playersID) && timeOut($timeout{warnrepeat})) {
			soundRO;
			focusRO;
			$timeout{warnrepeat}{time} = time;
		}
	}
}
1;
it saids RO window, but instead you may change it like above my @windows = FindWindowLike(0, "^Ragnarok");
you may need this
auto\win32\Guitest\
deps\win32\Guitest.pm
deps\win32\Gui.pm
Image
DARKest Ninja

Chontrad
Human
Human
Posts: 30
Joined: 23 Apr 2008, 10:11
Noob?: No
Location: Indonesia TANAH AIRKU
Contact:

Re: $interface for Blinking TaskBar

#6 Post by Chontrad »

Wow, thanks. Its useful.

Post Reply