hi everyone,
in a past post, oleg said it is possible to use the command line to execute a task, you simply need to use the name of the task in hex or decimal.
my question is, how do i know the name of the task in hex or decimal?
thanks
hex or decimal name of a task?
hex or decimal name of a task?
It is not documented. When you do "Create shortcut on desktop", RoboTask forms the command line automatically.
hex or decimal name of a task?
hi oleg,
ok, so a create a shortcut from RT. then a look a the name in the properties of the shortvut and i take the name in hex. it's a complicated process, but i will have to deal with it. so thanks for your answer.
ok, so a create a shortcut from RT. then a look a the name in the properties of the shortvut and i take the name in hex. it's a complicated process, but i will have to deal with it. so thanks for your answer.
hex or decimal name of a task?
Ok, we'll add menu item for generating of command line for selected task in next release.
hex or decimal name of a task?
hey oleg,
that is a great idea.
have a good day.
that is a great idea.
have a good day.
-
- Posts: 2
- Joined: Wed Nov 21, 2007 11:14 am
hex or decimal name of a task?
'*********************************************************** ************************************
' Simple workaround the Get the logfile
' This code will make a Variable For RoboTask {GET_LOG_FILE} witch contains the proper logname....
'*********************************************************** ************************************
' API to retrieve the current Threadid
Public Declare Function GetCurrentThreadId Lib "kernel32" () As Long
'Main events that have to be executed for errorhandling
Sub Main()
Dim Cnt As Long
Dim ThreadId As Long
Dim ThreadName As String
Dim Exname As String
'**Comment : Could be used to create a standalone logfile or comment the if statement to create logfiles for al tasks that are loaded in robotask
For X = 0 To RoboTaskApp.TaskCount - 1
RoboTaskApp.TaskInfo( X, Exname, ThreadName, ThreadId )
If (Exname = RoboTaskApp.ExternalName(GetCurrentThreadId)) Then
'**Comment above line
RoboTaskApp.SetUserVariable("Logfile" +"_" + ThreadName, sDecToHex(CStr(ThreadId))+".log")
'**Comment underneed line
End If
Next
End Sub
'Converting Decimal to Hexadecimal and return it as a string to fill the variable GET_LOG_FILE_ENVIROMENT_SCRIPT
Public Function sDecToHex(ByVal nSource As Double) As String
Const BASECHAR As String = "0123456789ABCDEF"
Dim n As Double
Dim nSrc As Double
If (nSource = 0) Then
sDecToHex = "00"
Exit Function
End If
If (nSource < 2147483648#) Then
sDecToHex = Hex(nSource)
Else
nSrc = nSource
Do
n = CDec(nSrc - (16 * Int(nSrc / 16)))
sDecToHex = Mid$(BASECHAR, n + 1, 1) & sDecToHex
nSrc = CDec(Int(nSrc / 16))
Loop While (nSrc > 0)
End If
If (Len(sDecToHex) Mod 2) Then sDecToHex = "0" & sDecToHex
Exit Function
End Function
' Simple workaround the Get the logfile
' This code will make a Variable For RoboTask {GET_LOG_FILE} witch contains the proper logname....
'*********************************************************** ************************************
' API to retrieve the current Threadid
Public Declare Function GetCurrentThreadId Lib "kernel32" () As Long
'Main events that have to be executed for errorhandling
Sub Main()
Dim Cnt As Long
Dim ThreadId As Long
Dim ThreadName As String
Dim Exname As String
'**Comment : Could be used to create a standalone logfile or comment the if statement to create logfiles for al tasks that are loaded in robotask
For X = 0 To RoboTaskApp.TaskCount - 1
RoboTaskApp.TaskInfo( X, Exname, ThreadName, ThreadId )
If (Exname = RoboTaskApp.ExternalName(GetCurrentThreadId)) Then
'**Comment above line
RoboTaskApp.SetUserVariable("Logfile" +"_" + ThreadName, sDecToHex(CStr(ThreadId))+".log")
'**Comment underneed line
End If
Next
End Sub
'Converting Decimal to Hexadecimal and return it as a string to fill the variable GET_LOG_FILE_ENVIROMENT_SCRIPT
Public Function sDecToHex(ByVal nSource As Double) As String
Const BASECHAR As String = "0123456789ABCDEF"
Dim n As Double
Dim nSrc As Double
If (nSource = 0) Then
sDecToHex = "00"
Exit Function
End If
If (nSource < 2147483648#) Then
sDecToHex = Hex(nSource)
Else
nSrc = nSource
Do
n = CDec(nSrc - (16 * Int(nSrc / 16)))
sDecToHex = Mid$(BASECHAR, n + 1, 1) & sDecToHex
nSrc = CDec(Int(nSrc / 16))
Loop While (nSrc > 0)
End If
If (Len(sDecToHex) Mod 2) Then sDecToHex = "0" & sDecToHex
Exit Function
End Function