It is currently July 23rd, 2024, 1:24 am

Floating Textbox Tool

Share and get help with Plugins and Addons
Posts: 98
Joined: August 6th, 2009, 3:03 pm

Floating Textbox Tool

Post by MattKing »

Taking inspiration from jsmorley's RainInput I've created a floating textbox tool that has no window, just the textbox. Hitting escape or clicking off the textbox closes the program, which upon the file being edited has the text written to it. If the parameter -top is set to 1, the Textbox Tool is always on top and will only be closed when escape is pressed (this is useful for copy paste)

I've been using it as a note editor on the desktop.
The program has several command line arguments which are case sensitive. No parameters are necessary for the program to run. Parameters that are strings must be surrounded in double quotes (""). All numbers are whole number integers except for fontSize which accepts decimal values.

List of parameters:

-x ## For its X position [Default = 0]
-y ## For its Y position [Default = 0]
-w ## For its width [Default = 200]
-h ## For its height [Default = 200]

-o ## sets the over all opacity (0 - 100)
Note: Overall opacity of the whole window, including the text and textbackground. I have not found a way to set only the opacity of the background yet.

-font "font name" sets the font [Default = Microsoft Sans Serif]
-fontSize ## sets the font size(this value takes decimal points) [Default = 8.25]

-r ## Red value of font color (0 - 255) [Default = 255]
-g ## Green value of font color (0 - 255) [Default = 255]
-b ## Blue value of font color (0 - 255) [Default = 255]

-r2 ## Red value of background color (0 - 255) [Default = 0]
-g2 ## Green value of background color (0 - 255) [Default = 0]
-b2 ## Blue value of background color (0 - 255) [Default = 0]

These parameters have no defaults
-f "path to note file" Is the path to the file you want to load to edit
-cmd "path to exe" is a path to a file you would want to execute after editing the file
-param "params" is a string of parameters for that cmd file thing

Right now the way I'm using it is like so:

Code: Select all

LeftMouseUpAction=!execute ["#CURRENTPATH#TextBoxTool.exe" -x 2377 -y 691 -w 186 -h #Height# -f "Notes.txt" -cmd "#PROGRAMPATH#Rainmeter.exe" -param "!RainmeterRefresh Enigma\Sidebar\Notes" ][!RainmeterShowMeter Icon][!RainmeterHideMeter IconActive][!RainmeterRedraw]

Code: Select all

-cmd "#PROGRAMPATH#Rainmeter.exe"  
---- Here I'm setting the program I want to launch after I'm done editing the file to be Rainmeter.exe

Code: Select all

-param "!RainmeterRefresh Enigma\Sidebar\Notes" 
---- Here I'm setting the parameters I wish to launch Rainmeter with, I'm refreshing the Notes config because I've edited the file.

If anyone finds this useful at all and wants a new feature or a change please feel free to ask.

Also if theres any bugs, report em to me.

Re: Floating Textbox Tool

Post by sgtevmckay »

Nice :D
Posts: 66
Joined: August 10th, 2009, 11:52 pm

Re: Floating Textbox Tool

Post by iUnify »

Good idea! Nice work, man!