Reference: ARexx
Move Up Move to Top Move to Prev Move to Next
Contents: NewsRog ARexx Info Project Commands Window Commands
Network Commands Server Commands Post Commands
Group Commands Article Commands
General NewsRog ARexx Info The NewsRog ARexx port name is NEWSROG. NewsRog ARexx commands are all upper case. Since ARexx normally converts non-quoted strings to upper case before sending them to the application, this is convenient.

Note that in some cases, parameters to ARexx commands which need to have their case preserved, such as filenames, must be quoted.

ShadowWorks Software cannot provide support on the ARexx scripting language. Please consult your ARexx documentation for more information on using ARexx.

Back to Top

ARexx Project Commands The following ARexx commands deal with projects.

CommandParametersDescription
OPENPROJECT_I None Interactively open a project. A file requestor is presented, and when the user selects a project file, this file will be loaded into NewsRog.
SAVEPROJECTAS_I None Interactively save a project. A file requestor is presented, and when the user selects a file, the current NewsRog project will be saved to the selected file.
SAVETOLAST None The current NewsRog project file will be saved to the last file that was opened or saved.
SAVETODEF None The current NewsRog project file will be saved as the default project.
NEWPROJECT None The currently loaded NewsRog project is erased from memory and a new project is begun.
RESTOREDEF None The current NewsRog project is replaced with the default project.
LASTSAVED None The current NewsRog project is replaced with the last saved project.
UNICONIFY None NewsRog is uniconified.
PROJFILENAME None The secondary result string RESULT is set to the name of the currently loaded project file.
PROJISMODIFIED None The secondary result string RESULT is set to 1 if the current project has been modified, and 0 otherwise. Note that only major modifications impact this variable, such as adding or deleting groups, servers, posts, and so on. Minor changes to configuration options do not affect this state.
LOADPROJECT FILENAME The current NewsRog project is loaded from the filename given in the FILENAME argument, which must be a valid NewsRog project file. Example:

    LOADPROJECT 'ram:Project.Foobar'
SAVEPROJECT FILENAME The current NewsRog project is saved to the filename given in the FILENAME argument. Example:

    SAVEPROJECT 'ram:Project.Foobar'
SHUTDOWN [MODE] The optional MODE parameter must be one of: ASK, SAVE, or NOSAVE. This command causes NewsRog to exit, saving the project if indicated. Example:

    SHUTDOWN SAVE

Back to Top

ARexx Window Commands The following ARexx commands deal with windows.

CommandParametersDescription
OPENWINDOW WINDOWNAME WINDOWNAME must be one of: GROUPS, NETWORK, SERVERS, POSTS, MULTIMEDIA, or CONFIG. The named NewsRog window is opened, or brought to the front if already open. Example:

    OPENWINDOW GROUPS
CLOSEWINDOW WINDOWNAME WINDOWNAME takes the same values as in the OPENWINDOW command. The named NewsRog window will be closed. Example:

    CLOSEWINDOW GROUPS
ISWINDOWOPEN WINDOWNAME WINDOWNAME takes the same values as in the OPENWINDOW command. The secondary result variable RESULT is set to 1 if the named window is open, and to 0 otherwise.

Back to Top

ARexx Network Commands The following ARexx commands deal with the NewsRog Networking State.

CommandParametersDescription
ONLINE None Change NewsRog to online mode.
OFFLINE None Change NewsRog to offline mode.
ISONLINE None The secondary result variable RESULT is set to 1 if NewsRog is currently in online mode, and 0 otherwise.

Back to Top

ARexx Server Commands The following ARexx commands deal with servers:

CommandParametersDescription
SERVEREXISTS SERVER The SERVER parameter may be either a server name ("news.foobar.com"), or an ordinal position in the server list starting from 0. The secondary result variable RESULT is set to 1 if the indicated server exists, and to 0 otherwise.
SERVERCOUNT None The secondary result variable RESULT is set to the number of servers in the NewsRog server list.
GETSERVER SERVER The secondary result variable RESULT is set to the name of the indicated server.
ADDSERVER SERVERNAME A server with the given name is inserted into the NewsRog server list.
GETDEFSERVER None The secondary result variable RESULT is set to the name of the default server.
SETDEFSERVER SERVER The indicated server set set as the default server.

Back to Top

ARexx Post Commands The following ARexx commands deal with posts:

CommandParametersDescription
POSTCOUNT None The secondary result variable RESULT is set to the number of posts in the NewsRog post queue.
ADDPOST None A new, empty post is added to the NewsRog post queue. The secondary result variable RESULT is set to the ordinal number of the new post in the post queue.
SENDPOST POSTS The posts specified by POSTS are send to the network. POSTS may be iether a space separated list of numbers, or the keyword ALL to send all posts in the queue. Example:

    SENDPOST ALL
    SENDPOST 2 4 5
POSTCMD POSITION POSTCOMMAND The POSTCOMMAND is sent to the post indicated by POSITION, which is an ordinal position in the NewsRog post queue starting from 0. The valid POSTCOMMANDs are listed in the next table. Example:

    POSTCMD 2 SETSUBJ 'My Subject'

The following commands may be sent to a particular post by using the POSTCMD Arexx command described above:

CommandParametersDescription
OPENPOSTEDITOR None The post editor for the specified post is opened.
ISPOSTEDITOROPEN None The secondary result variable RESULT is set to 1 if the post editor for the specified post is open, and 0 otherwise.
CLOSEPOSTEDITOR [FORCE] [NOSAVE] The post editor for the specified post is closed. If the optional FORCE parameter is given, then no questions are asked if the post has been modified and the close action would cause the modifications to be lost. If the optional NOSAVE parameter is given, then the post is not saved when the post editor is closed. Examples:

    POSTCMD 0 CLOSEPOSTEDITOR NOSAVE FORCE
    POSTCMD 1 CLOSEPOSTEDITOR
ISPOSTMODIFIED None The secondary result variable RESULT is set to 1 if the post has been modified since the last save, and 0 otherwise.
GETSUBJ None The secondary result variable RESULT is set to the Subject: header of the specified post.
GETGROUPS None The secondary result variable RESULT is set to the Newsgroups: header of the specified post.
GETFUPS None The secondary result variable RESULT is set to the Followups: header of the specified post.
GETDISTRIB None The secondary result variable RESULT is set to the Distribution: header of the specified post.
GETSIGFILE None The secondary result variable RESULT is set to the filename of the signature file to be appended to this post when it is sent to the network.
GETPOSTLINES None The secondary result variable RESULT is set to the number of lines in the post. This variable is only updated when a post is saved, not during editing when the post editor is open.
GETPOSTBYTES None The secondary result variable RESULT is set to the number of bytes in the post. This variable is only updated when a post is saved, not during editing when the post editor is open.
SETSUBJ SUBJECT The Subject: header of the specified post is set to the specified value, which should be quoted to avoid ARexx case munging.
SETGROUPS GROUPS The Newsgroups: header of the specified post is set to the specified value, which should be quoted to avoid ARexx case munging.
SETFUPS FOLLOWUPS The Followups: header of the specified post is set to the specified value, which should be quoted to avoid ARexx case munging.
SETDISTRIB DISTRIB The Distribution: header of the specified post is set to the specified value, which should be quoted to avoid ARexx case munging.
SETSIGFILE FILENAME The filename of the signature file to be appended to this post when it is sent to the network is set to the specified value.

Back to Top

ARexx Group Commands The following ARexx commands deal with groups:

CommandParametersDescription
OPENGROUP GROUP Opens the group window for the indicated group. The GROUP parameter may be either the name of a subscribed-to newsgroup, or the ordinal position of the group in the NewsRog groups list starting from 0. Due to ARexx capitalization of unquoted strings, it is necessary to quote newsgroup names. Examples:

    /* open c.s.a.misc */
    OPENGROUP 'comp.sys.amiga.misc'
    /* open the first group in the group list */
    OPENGROUP 0
CLOSEGROUP GROUP [NOSAVE] [FORCE] Closes the group window for the indicated group. The GROUP parameter is a group name or ordinal number as described for the OPENGROUP command. If the optional keyword NOSAVE is given, then the group overview will not be saved when the group is shut down. If the optional keyword FORCE is given, then no questions will be asked if the group overview information has been modified and would be lost when the group is shut down. Examples:

    /* close c.s.a.misc */
    CLOSEGROUP 'comp.sys.amiga.misc' SAVE FORCE
    /* close the first group in the group list */
    CLOSEGROUP 0
ISGROUPOPEN GROUP The secondard result string RESULT is set to 1 if the indicated group is open, and to 0 otherwise. The GROUP parameter is a group name or ordinal number as described for the OPENGROUP command. Examples:
    ISGROUPOPEN 'comp.sys.amiga.misc'
GROUPEXISTS GROUP The secondard result string RESULT is set to 1 if the indicated group exists in the NewsRog subscription list, and to 0 otherwise. The GROUP parameter is a group name or ordinal number as described for the OPENGROUP command. Examples:
    GROUPEXISTS 'comp.sys.amiga.misc'
GROUPCOUNT None The secondard result string RESULT is set to the number of newsgroups in the NewsRog subscription list.
GETGROUP GROUP The secondard result string RESULT is set to the name of the indiciated group. This is useful to determine the newsgroup name given an ordinal position in the subscription list. Example:

    GETGROUP 0
UPDCOUNT GROUP The new article count for the indiciated group is updated from the NNTP server.
MARKREAD GROUP All current articles in the indicated group are marked as read.
MAKRUNREAD GROUP All current articles in the indicated group are marked as unread.
SORTGROUPS GROUP The list of groups in the subscription list is sorted based on the current sort criteria.
ADDGROUP GROUPNAME A group with the given name is added to the subscription list.
OPENSERVERGROUPS None The Server Groups window is opened if it is not open already.
CLOSESERVERGROUPS None The Server Groups window is closed if it is open.
CLEARSERVERGROUPS None The list of server groups in the Server Groups window is cleared.
FETCHSERVERGROUPS [PATTERN] The groups from the server matching the given pattern is fetched from the NNTP server. If no pattern is given, an asterisk (*) is used to fetch all the groups. Like all network IO in NewsRog, this operation is started asynchronously, and may take some time to complete. The SGFETCHPENDING command may be used to determine if the operation has completed.
SGFETCHPENDING None The secondard result variable RESULT is set to 1 if a FETCHSERVERGROUPS command is currently running, and to 0 otherwise.
SERVERGROUPCOUNT None The secondard result variable RESULT is set to the number of groups currently in the server groups list.
GETSERVERGROUP POSITION The secondard result variable RESULT is set to the name of the group at the given position in the server groups list. The first group is number 0.
GROUPCMD GROUP GROUPCOMMAND The GROUPCOMMAND is sent to the indiciated group (which may be a group name or an ordinal position in the group list starting from 0). The valid GROUPCOMMANDs are listed in the next table. Example:

    GROUPCMD alt.test FETCHNEW

The following ARexx commands may be sent to a specific group by using the GROUPCMD command described above:

CommandParametersDescription
SAVEOV None The group overview database for the current group is saved. The group window for this group must be open for this command to function. Example:

GROUPCMD 'alt.test' SAVEOV

FETCHNEW None New headers are fetched from the NNTP server. Like all network I/O in NewsRog, this operation is asynchronous. The FETCHPENDING command may be used to determine if a FETCHNEW is currently pending. The group window for this group must be open for this command to function.
FETCHPENDING None The secondard result variable RESULT is set to 1 if a FETCHNEW command is currently pending, and to 0 otherwise.
EXPIRE None Old articles are expired from the newsgroup. The group window for this group must be open for this command to function.
OPENFAQLIST None The FAQ List window for this group is opened.
CLOSEFAQLIST None The FAQ List window for this group is closed.
ISFAQLISTOPEN None The secondard result variable RESULT is set to 1 if the FAQ List window for this group is open, and to 0 otherwise.
OPENARTSEARCHWIN None The article list search window is opened. The group window for this group must be open for this command to function.
OPENBODYSEARCHWIN None The article body search window is opened. The group window for this group must be open for this command to function.
BATCHDLHDRS None Headers for this group will be downloaded in batch mode, even if the group window is closed.
BATCHDLHDRSPENDING None The secondard result variable RESULT will be set to 1 if a BATCHDLHDRS operation is currently pending, and to 0 otherwise.
BATCHDLARTS None Headers and articles for this group will be downloaded in batch mode, even if the group window is closed.
BATCHDLARTSPENDING None The secondard result variable RESULT will be set to 1 if a BATCHDLARTS operation is currently pending, and to 0 otherwise.
DISPARTCOUNT None The secondard result variable RESULT will be set to the number of articles currently displayed in the group's article list. The group window for this group must be open for this command to function.
GROUPARTCOUNT None The secondard result variable RESULT will be set to the number of articles in this group, including even articles not displayed in the article list. The group window for this group must be open for this command to function.
SETTHREADMODE MODE The thread display mode for this group is set to MODE, which must be one of: ALL, BASE, or 1THREAD. The group window for this group must be open for this command to function. Example:

    GROUPCMD 'alt.test' SETTHREADMODE ALL
GETTHREADMODE None The secondard result variable RESULT is set to one of the following strings according to the current thread mode of the group: ALL, BASE, or 1THREAD. The group window for this group must be open for this command to function.
ARTBROWSE [BACK] [MODE] Browse through articles. If the optional BACK argument is given, then browsing happens backwards. Otherwise it is forwards. The optional MODE argument may be one of: THREAD, ART, or NORMAL. NORMAL browsing pages forward in an article until the end, and then moves to the next article. ART moves to the beginning of the next article without scrolling the current article. THREAD browsing moves to the beginning of the next thread without moving to other articles in the current thread. The group window for this group must be open for this command to function. Examples:

    GROUPCMD 'alt.test' ARTBROWSE
    GROUPCMD 'alt.test' ARTBROWSE THREAD
    GROUPCMD 'alt.test' ARTBROWSE BACK ART
ARTSCROLL [BACK] Scroll in the currently displayed article. The optional BACK argument causes a reverse scroll. The group window for this group must be open for this command to function. Examples:

    GROUPCMD 'alt.test' ARTSCROLL
    GROUPCMD 'alt.test' ARTSCROLL BACK
ARTICLETOP None Move to the top of the currently displayed article. The group window for this group must be open for this command to function.
ARTICLEBOTTOM None Move to the bottom of the currently displayed article. The group window for this group must be open for this command to function.
DISPART POSITION Fetch the article indicated by POSITION, which is an ordinal number in the article list starting from zero, and display it in the article viewer when it is available. The article will be fetched from the local disk cache if available, and from the network otherwise. The group window for this group must be open for this command to function. Example:

    GROUPCMD 'alt.test' DISPART 25
SETACTIVE POSITION The article indicated by POSITION is made the active article in the article list. If done in BASE thread mode, then this is the thread that will be entered when the thread mode is changed to 1THREAD. The group window for this group must be open for this command to function. Example:

    GROUPCMD 'alt.test' SETACTIVE 25
ARTFETCHPENDING None The secondard result variable RESULT is set to 1 if there are articles currently in the download queue for this group, and to 0 otherwise. The group window for this group must be open for this command to function.
WINCTRL WINDOW POS WINDOW may be either ARTLIST or ARTVIEW. POS may be either BACK or FRONT. The indicated window, if open, is moved to the back or front of the window stack for this screen. Example:

    GROUPCMD 'alt.test' WINCTRL ARTLIST FRONT
ARTCMD POSITION ARTCOMMAND The ARTCOMMAND is sent to the indiciated article, which is an ordinal position in the current article list starting from 0. The group window for this group must be open for this command to function. The valid ARTCOMMANDs are listed in the section on Article Commands.

Back to Top

ARexx Article Commands The following ARexx commands deal with articles, and must be sent to a particular article using the ARTCMD group command.

CommandParametersDescription
FINDHEADER HEADER The secondard result variable RESULT is set to the indicated header of the article, if found, and to a null string otherwise. Due to ARexx case conversion, the HEADER must be quoted to preserve case. Example:

    GROUPCMD 0 ARTCMD 25 FINDHEADER 'Subject'
ISREAD None The secondard result variable RESULT is set to 1 if the article has been read, and 0 otherwise.
ISPERM None The secondard result variable RESULT is set to 1 if the article is marked as permanent, and 0 otherwise.
ISUSERMK None The secondard result variable RESULT is set to 1 if the article has been marked (bold), and 0 otherwise.
ISNEW None The secondard result variable RESULT is set to 1 if the article is newly downloaded, and 0 otherwise.

Back to Top