The latest and greatest version of TAD's Home Integration Script. The script encompasses many of the old features streamlined. Please refer to the following list of commands:
/start - Opens a dialog on the desktop if it isn't already open. If it is open, it closes it and then re-opens it.
/desk - Opens a dialog in the IRC window if it isn't already open. If it is open, it closes it and then re-opens it.
/close - Closes an open dialog if it is open. If it isn't open, then the script refers to the built-in /close command.
/minimize - Minimizes an open dialog or tells you it isn't open.
/restore - Restores a minimized dialog or tells you it isn't open.
/focus - Focuses on an id in a dialog or tells you the dialog isn't open.
/activate - Enables an id in a dialog or tells you the dialog isn't open.
/deactivate - Disables an id in a dialog or tells you the dialog isn't open.
/mark - Places a check mark or radio mark where appropriate or tells you the dialog isn't open.
/uncheck - Removes a check mark where appropriate or tells you the dialog isn't open.
/add - Adds text to an id in an open dialog or tells you the dialog isn't open.
/purge - Clears all text form an id in an open dialog or tells you the dialog isn't open.
/replace - Replaces any text with the text specified in the id of an open dialog or tells you the dialog isn't open.
/resize.d - Resizes a dialog based on the dbu option or tells you the dialog isn't open.
/resize.p - Resizes a dialog based on the pixel option or tells you the dialog isn't open.
/ok - Closes an open dialog box as though the user clicked the 'ok' button or tells you the dialog isn't open.
/cancel - Closes an open dialog box as though the user click the 'cancel' button or tells you the dialog isn't open.
/speak - Displays text in the currently active window.
This new integration upgrade requires the AGFile script which can be found here: http://www.hawkee.com/snippet/8236/
alias homeperm {
If ($1 == version) { return 4.0.1.1 }
If ($1 == title) { return TAD's_Home_Integration_Script }
If ($1 == author) { return The_Almighty_Duelist }
If ($1 == description) { return Integration Help Script for Dialogs. }
If ($1 == product_id) { return N001-4011 }
}
alias start {
If ($readini(agfile.ini,home,installed) != yes) { halt }
If ($1- == $null) { echo 2 -a * /start: Missing dialog name. | halt }
If ($dialog($1) == $1) { dialog -x $1 }
dialog -md $1 $1
}
alias desk {
If ($readini(agfile.ini,home,installed) != yes) { halt }
If ($1- == $null) { echo 2 -a * /desk: Missing dialog name. | halt }
If ($dialog($1) == $1) { dialog -x $1 }
dialog -m $1 $1
}
alias close {
If ($readini(agfile.ini,home,installed) != yes) { halt }
If ($1- == $null) { echo 2 -a * /close: Missing dialog name. | halt }
If ($dialog($1) == $1) { dialog -x $1 }
Else { close $1- }
}
alias minimize {
If ($readini(agfile.ini,home,installed) != yes) { halt }
If ($1- == $null) { echo 2 -a * /minimize: Missing dialog name. | halt }
If ($dialog($1) == $1) { dialog -i $1 | return }
echo 2 -a * /minimize: dialog ' $+ $1 $+ ' isn't open.| halt
}
alias restore {
If ($readini(agfile.ini,home,installed) != yes) { halt }
If ($1- == $null) { echo 2 -a * /restore: Missing dialog name. | halt }
If ($dialog($1) == $1) { dialog -e $1 | return }
echo 2 -a * /restore: dialog ' $+ $1 $+ ' isn't open. | halt
}
alias focus {
If ($readini(agfile.ini,home,installed) != yes) { halt }
If ($2- == $null) { echo 2 -a * /focus: Missing parameters. /focus <name> <id> | halt }
If ($dialog($1) == $1) { did -f $1- | return }
echo 2 -a * /focus: dialog ' $+ $1 $+ ' isn't open. | halt
}
alias activate {
If ($readini(agfile.ini,home,installed) != yes) { halt }
If ($2- == $null) { echo 2 -a * /activate: Missing parameters. /activate <name> <id> | halt }
If ($dialog($1) == $1) { did -e $1- | return }
echo 2 -a * /activate: dialog ' $+ $1 $+ ' isn't open. | halt
}
alias deactivate {
If ($readini(agfile.ini,home,installed) != yes) { halt }
If ($2- == $null) { echo 2 -a * /deactivate: Missing parameters. /deactivate <name> <id> | halt }
If ($dialog($1) == $1) { did -b $1- | return }
echo 2 -a * /deactivate: dialog ' $+ $1 $+ ' isn't open. | halt
}
alias mark {
If ($readini(agfile.ini,home,installed) != yes) { halt }
If ($2- == $null) { echo 2 -a * /check: Missing parameters. /check <name> <id> | halt }
If ($dialog($1) == $1) { did -c $1- | return }
echo 2 -a * /check: dialog ' $+ $1 $+ ' isn't open. | halt
}
alias uncheck {
If ($readini(agfile.ini,home,installed) != yes) { halt }
If ($2- == $null) { echo 2 -a * /uncheck: Missing parameters. /uncheck <name> <id> | halt }
If ($dialog($1) == $1) { did -u $1- | return }
echo 2 -a * /uncheck: dialog ' $+ $1 $+ ' isn't open. | halt
}
alias add {
If ($readini(agfile.ini,home,installed) != yes) { halt }
If ($3- == $null) { echo 2 -a * /add: Missing parameters. /add <name> <id> <info> | halt }
If ($dialog($1) == $1) { did -a $1- | return }
echo 2 -a * /add: dialog ' $+ $1 $+ ' isn't open. | halt
}
alias purge {
If ($readini(agfile.ini,home,installed) != yes) { halt }
If ($2- == $null) { echo 2 -a * /purge: Missing parameters. /purge <name> <id> | halt }
If ($dialog($1) == $1) { did -r $1- | return }
echo 2 -a * /purge: dialog ' $+ $1 $+ ' isn't open. | halt
}
alias replace {
If ($readini(agfile.ini,home,installed) != yes) { halt }
If ($3- == $null) { echo 2 -a * /replace: Missing parameters. /replace <name> <id> <new info> | halt }
If ($dialog($1) == $1) { did -ra $1- | return }
echo 2 -a * /replace: dialog ' $+ $1 $+ ' isn't open. | halt
}
alias resize.d {
If ($readini(agfile.ini,home,installed) != yes) { halt }
If ($5- == $null) { echo 2 -a * /resize.d: Missing parameters. /resize.d <name> <x y w h> | halt }
If ($dialog($1) == $1) { dialog -sd $1- | return }
echo 2 -a * /resize.d: dialog ' $+ $1 $+ ' isn't open. | halt
}
alias resize.p {
If ($readini(agfile.ini,home,installed) != yes) { halt }
If ($5- == $null) { echo 2 -a * /resize.p: Missing parameters. /resize.p <name> <x y w h> | halt }
If ($dialog($1) == $1) { dialog -sp $1- | return }
echo 2 -a * /resize.p: dialog ' $+ $1 $+ ' isn't open. | halt
}
alias ok {
If ($readini(agfile.ini,home,installed) != yes) { halt }
If ($1 == $null) { echo 2 -a * /ok: Missing parameters. /ok <name> | halt }
If ($dialog($1) == $1) { dialog -k $1 | return }
echo 2 -a * /ok: dialog ' $+ $1 $+ ' isn't open. | halt
}
alias cancel {
If ($readini(agfile.ini,home,installed) != yes) { halt }
If ($1 == $null) { echo 2 -a * /cancel: Missing parameters. /cancel <name> | halt }
If ($dialog($1) == $1) { dialog -c $1 | return }
echo 2 -a * /cancel: dialog ' $+ $1 $+ ' isn't open. | halt
}
on *:LOAD: {
echo 2 -a TAD's Home Integration Script (C) $+ $asctime(yyyy) DJ Bill Enterprizes
If ($readini(agfile.ini,home,installed) != yes) {
agfile register home $homeperm(version) $homeperm(title) $homeperm(author) yes $homeperm(description)
echo -a Please type /install home to install TAD's Home Integration Script.
}
Else {
If ($agversion(home) != $homeperm(version)) {
agfile update home $homeperm(version) $homeperm(title) $homeperm(product_id) $homeperm(author) yes $homeperm(description)
exit -nr
}
}
}
on *:START: {
echo 2 -a TAD's Home Integration Script (C) $+ $asctime(yyyy) DJ Bill Enterprizes
If ($readini(agfile.ini,home,installed) != yes) {
agfile register home $homeperm(version) $homeperm(title) $homeperm(author) yes $homeperm(description)
echo -a Please type /install home to install TAD's Home Integration Script.
}
Else {
If ($agversion(home) != $homeperm(version)) {
agfile update home $homeperm(version) $homeperm(title) $homeperm(product_id) $homeperm(author) yes $homeperm(description)
exit -nr
}
}
}
alias speak {
If ($readini(agfile.ini,home,installed) != yes) { halt }
If ($1 == $null) { echo 2 -a * /speak: Missing paramaters: /speak <info> | halt }
echo 2 -a $1-
}
alias home {
If ($1 == install) {
agfile install home $homeperm(product_id)
writeini agfile.ini status installing no
}
If ($1 == update) {
agfile update home $homeperm(version) $homeperm(title) $homeperm(product_id) $homeperm(author) yes $homeperm(description)
writeini agfile.ini status updating no
}
If ($1 == register) {
agfile register home $homeperm(version) $homeperm(title) $homeperm(author) yes $homeperm(description)
echo 2 -a Registration complete! You may now type /install home
}
If ($1 == uninstall) {
agfile uninstall home
echo 2 -a Uninstall complete!
}
}
dialog home {
title Home
option dbu
size -1 -1 -1 -1
}
on *:DIALOG:home:init:*: {
dialog -x home
}
-edit-
Updated and streamlined. Now required the AGFile script which can be found here: http://www.hawkee.com/snippet/8236/
Will continue to update all other scripts to fit the new format. (With the exception of Staff Bot 5.2 and earlier)
-edit-
Added an error checker. More interactive than most. When an error message appears (example Error 002 00001), simply type /error and a dialog will appear. Simply provide in the spaces available. You will get another error code or message if you don't provide a correct error code.
All of the useless and not needed scripting is there for 'integration'. supposed to make it easier to script. you only use what you need. most scripts that i post and bots will use this script and yes %uninstall.code will come in handy later on in life....trust me on this.
the @uninstall event:
If ($1- == $null ) {
echo -a Please type a command after this. This is the same command you used to install the program.
}.....
this is not done automatically (this is also apart of the uninstall script)
The only thing this really does is disable the script you are trying to uninstall
don't fret...this isn't the only upgrade to this script i'll be making...when i learn how to use $sockets i'll host script from another site using the integration script
but nobody said you have to use my scripts (obv)
There is no point to the license part in the script cause it will auto do that on loading the script so there is no point for that.
If ($1- == $null ) {
echo -a Please type a command after this. This is the same command you used to install the program.
}
Else {
No check if it is the correct word from %uninstall.code?
@ uninstall event:
set %uninstall.code
useless because no check after reinstalling.
There is allot of not needed scripting in this script. and first release your bot before posting this cause it is no useless...
3/10
-edit-
I realized just how much this script was broken. Have made many fixes. NO MORE NEED TO INSTALL this program. It will install itself upon loading into your remotes. This code will no longer work with any previous scripts. Will update all other scripts when I get around to them.
You must have this script to operate Staff Bot 3 which will come out soon! (Hopefully)
For all services questions, you must install the Help Connection Center (which is included with Staff Bot 3). And will be available shortly after this update has been posted.