Jump to content

Text Coordinates


Warrior124

Recommended Posts

Is there anyway of getting the coordinates of a word anywhere in a window? Say you are looking for the word "Test" in a sentence that reads "This is one test in a set of ongoing tests being conducted this week". I need to be able to get the coordinates of the word "Test" on any line, and anywhere the word "Test" appears. Is there anyway of doing this?

Link to comment
Share on other sites

Guest X-Fusion

I dont think theres anyway you can do that. I think the only way you can do it from a text event would be to evaluate the length of the entire sentence ($1-) and make it look for that word. I've never tried it, but, looking through the helpfile for '$window' returns the following.

$window(N/@name)

Returns properties for a window.

 

Properties: x, y, w, h, dx, dy, dw, dh, bw, bh, mdi, title, state, font, fontsize, logfile, stamp, icon, ontop, type, anysc, wid, cid, hwnd, sbtext, sbcolor, script

 

x,y,w,h return the left, top positions, and the width and height of the window respectively.

dx,dy return the left, top positions of the window relative to the desktop.

dw,dh return the width and height of the text display area.

bw,bh return the width and height of the bitmap for a graphic window.

mdi returns $true if the window is mdi, otherwise returns $false

state returns minimized/maximized/hidden/normal

title returns the text in the titlebar of the window

 

font returns the name of the current font

fontsize returns the size of the current font

fontbold returns $true if the font is bold, otherwise returns $false

logfile returns name of logfile if one is open for the window

stamp returns timestamp setting

icon returns on/off depending on whether icon is visible

ontop returns ontop status for a window

type returns window type

anysc returns $true if the /window -i switch was specified

wid returns the window id

 

cid returns the associated connection id

sbtext returns the switchbar button text

sbcolor returns the switchbar highlight color

script returns the script name of the current font

 

You can also use the format $window(@wildcard,N) which returns the Nth window matching the wildcard window name.

 

Note: You can also get the .w and .h properties by specifying: -1 for the width and height of the screen, -2 for the main mIRC window, and -3 for the MDI window where all other windows inside mIRC are displayed.

Might help, might not.

Link to comment
Share on other sites

ty, xfusion. However, it isn't what I'm looking for. I,m wanting to use a picture window where certain text would be replaced with pics. Such as :+) would be replaced with the pic called smile.gif, or something to that point. I know to add a pic inside the picture window you will have to use the /drawpic command. However, with that command you need to specify the coordinates where the pic needs to be drawn.

Link to comment
Share on other sites

Guest X-Fusion

Then you'd probably have to evaluate $window(@name).h, $window(@name).x, $window(@name).y, $window(@name).w. I haven't played with picwin in that fashion, but, you could probably visit here and they may be able to help you better then us.

Link to comment
Share on other sites

I know exactly what you mean Warrior. I actually did it once... How? I have no idea, but I did. This was back when TCN was in operation. Since then I have lost most of my mIRC knowledge. I just know simple stuff now. I don't plan on expanding my knowledge anymore than what it is anyway.

 

I actually did the idea you're working on to make a non-dll powered emoticon chat. Of course I didn't know about buffers back then so everything was slow and I just gave up on it. I couldn't scroll it either, so meh.

 

I wish I could help you more :S I honestly do not know how I did it. :( I wish I knew though... So sorry warrior :(

Link to comment
Share on other sites

  • 3 weeks later...
Guest X-Fusion

Well, it's probably a lengthy process. First, identifying the total lines, then finding the first line, evaluating the rest and looking through the text to find your specified world.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...