m (Bot: Automated text replacement (-Added On:.+\n?\n?\n?\n?\n? +)) |
m (→Properties: add missing status) |
||
(15 intermediate revisions by 5 users not shown) | |||
Line 1: | Line 1: | ||
− | The '''$get''' identifier can be used to gather various details regarding open [[/dcc command - mIRC|DCC Get]] windows. | + | {{mirc title|$get Identifier}}The '''$get''' identifier can be used to gather various details regarding open [[/dcc command - mIRC|DCC Get]] windows, even if the transfers completed. |
+ | |||
== Synopsis == | == Synopsis == | ||
Line 9: | Line 10: | ||
| [N] | If a nickname is specified in the primary parameter, the secondary N targets the Nth connection associated with that nickname match | | [N] | If a nickname is specified in the primary parameter, the secondary N targets the Nth connection associated with that nickname match | ||
}} | }} | ||
+ | <br /><br /> | ||
+ | |||
+ | When N = 0, $get(N) returns the total number of all transfers, and $get($nick,N) returns total transfers from $nick.<br /> | ||
+ | $get($nick) used without the 2nd N parameter returns $nick if there is at least 1 $get or $null if no transfers.<br /> | ||
+ | When N >=1, $get(N) or $get($nick,N) returns the $nick associated with that transfer.<br /> | ||
+ | When sender changes nick, the $get is still associated with the old nick unless you use: {{mIRC|/dcc|/dcc nick -sgcf <oldnick> <newnick>}} | ||
+ | |||
+ | '''Note''': $get(-1) can be used during the {{mIRC|on events/on filercvd|ON FILERCVD}} and {{mIRC|on events/on getfail|ON GETFAIL}} events, it refers to the 'get' which triggered that event. | ||
== Properties == | == Properties == | ||
{{ArgsList | {{ArgsList | ||
| cid | The connection id | | cid | The connection id | ||
− | | cps | The characters-per-second transfer rate | + | | cps | The characters-per-second transfer rate, averages speed during recent time period until transfer finishes, when rate is averaged across entire connection time |
| done | Returns {{mIRC|$true}} if the transfer has completed, otherwise returns {{mIRC|$false}} | | done | Returns {{mIRC|$true}} if the transfer has completed, otherwise returns {{mIRC|$false}} | ||
| file | The file name of the current transfer | | file | The file name of the current transfer | ||
| hwnd | The window handle | | hwnd | The window handle | ||
− | | idle | | + | | idle | the number of seconds that the file transfer has been idle |
| ip | The [[IP Address]] for the remote user | | ip | The [[IP Address]] for the remote user | ||
| path | The path of the file name being transferred | | path | The path of the file name being transferred | ||
| pc | The percentage complete for the transfer | | pc | The percentage complete for the transfer | ||
− | | rcvd | The total amount of bytes received so far | + | | rcvd | The total amount of bytes received so far including the resume offset received during a previous get |
− | | resume | If the transfer has been resumed, returns the location in the file from where the resume took place | + | | resume | If the transfer has been resumed, returns the location in the file from where the resume took place. Does not offer a way to discern between a transfer not resumed and a transfer resumed at offset zero |
| secs | The total number of seconds the transfer has been connected | | secs | The total number of seconds the transfer has been connected | ||
| size | The file size in bytes for the transfer | | size | The file size in bytes for the transfer | ||
− | | status | The status of the window; returns: '''active''', or ''' | + | | status | The status of the window; returns: '''sent''', '''active''', '''failed''', '''received''' or '''waiting''' |
| wid | The mIRC window id for this window | | wid | The mIRC window id for this window | ||
}} | }} | ||
Line 35: | Line 44: | ||
Echo the total number of transfers: | Echo the total number of transfers: | ||
<source lang="mIRC">//echo -a $get(0)</source> | <source lang="mIRC">//echo -a $get(0)</source> | ||
+ | |||
+ | Summary of open [[/dcc command - mIRC|DCC Get]] windows: | ||
+ | <pre>//var %i 1 | while ( %i isnum 1- $get(0) ) { echo -a %i nick: $get(%i) file: $get(%i).file size: $get(%i).size status: $get(%i).status | inc %i }</pre> | ||
== Compatibility == | == Compatibility == | ||
− | + | {{mIRC compatibility|4.52}} | |
== See Also == | == See Also == | ||
Line 45: | Line 57: | ||
{{mIRC identifier list}} | {{mIRC identifier list}} | ||
− | [[Category: | + | [[Category:mIRC identifiers|get]] |
Latest revision as of 15:54, 3 May 2023
The $get identifier can be used to gather various details regarding open DCC Get windows, even if the transfers completed.
Synopsis[edit]
$get(N/nick[,N])[.property]
Parameters[edit]
N/nick Refers to either the Nth open connection, or the connection associated with a specific user's nickname
[N] If a nickname is specified in the primary parameter, the secondary N targets the Nth connection associated with that nickname match
When N = 0, $get(N) returns the total number of all transfers, and $get($nick,N) returns total transfers from $nick.
$get($nick) used without the 2nd N parameter returns $nick if there is at least 1 $get or $null if no transfers.
When N >=1, $get(N) or $get($nick,N) returns the $nick associated with that transfer.
When sender changes nick, the $get is still associated with the old nick unless you use: /dcc nick -sgcf <oldnick> <newnick>
Note: $get(-1) can be used during the ON FILERCVD and ON GETFAIL events, it refers to the 'get' which triggered that event.
Properties[edit]
cid The connection id
cps The characters-per-second transfer rate, averages speed during recent time period until transfer finishes, when rate is averaged across entire connection time
done Returns $true if the transfer has completed, otherwise returns $false
file The file name of the current transfer
hwnd The window handle
idle the number of seconds that the file transfer has been idle
ip The IP Address for the remote user
path The path of the file name being transferred
pc The percentage complete for the transfer
rcvd The total amount of bytes received so far including the resume offset received during a previous get
resume If the transfer has been resumed, returns the location in the file from where the resume took place. Does not offer a way to discern between a transfer not resumed and a transfer resumed at offset zero
secs The total number of seconds the transfer has been connected
size The file size in bytes for the transfer
status The status of the window; returns: sent, active, failed, received or waiting
wid The mIRC window id for this window
Example[edit]
Echo the total percent completed of the 3rd transfer:
//echo -a $get(3).pc
Echo the total number of transfers:
//echo -a $get(0)
Summary of open DCC Get windows:
//var %i 1 | while ( %i isnum 1- $get(0) ) { echo -a %i nick: $get(%i) file: $get(%i).file size: $get(%i).size status: $get(%i).status | inc %i }
Compatibility[edit]
Added: mIRC v4.52
Added on: 06 Jul 1996
Note: Unless otherwise stated, this was the date of original functionality.
Further enhancements may have been made in later versions.