I am looking for a complete call list and definitions for DDE API calls for Rumba. The following I have and some notes and the Last two items I don't know how to use. And any/all other DDE commands that are available.
("CopyBlock(StartPosition,EndPosition)") ;Returns a block of text
("CopyStream(StartPosition,EndPosition)") ;Returns a stream of text
("Fattr(position)") ;Returns The Field Attribute number for the selected position
("Fget(Length,Position)") ;Returns text from a field *
("Find(string,Position)") ;Returns the position of the search string
("Fsearch(Sting,Position)") ;Tests if a string is on the screen in a perticular position. Returns 0 if it does not find the string, and the string position if it does find the sting.
("Cursor") ;Returns cursor's current position
("OIABND") ;Returns The OIA (Operator Information Area)number
("OIAKBD") ;Returns 0 if The OIA keyboard status is unlocked
("OIAReady") ;Returns 1 if The host session is ready
("Flen(Type,Position") ;Have not been able to get this to work due to not knowing what the types are.
("Fpos(Type,Position") ;Have not been able to get this to work due to not knowing what the types are
Also I was looking for a DDE request that could tell me the current screen render size. Like in most normal AS400 option windows are 80 Char wide but some Large data display options are 132 and I have to call a routine accordingly. But if there is a DDE command to tell me the size of the current window would be great then I will not have to have two sets of routine calls for their respective size. 132 or 80. and I can reduce it to one call. For myself I don't mind but when other people take a chunk of code I have to explain every time to make sure to look out for window size and such.
Sample of code that I currently use and is working. AutoHotKey with DDE back-end interface.
Block(srow, scol, erow, ecol)
{
result =
sPosition := ((srow * 80) - 80) scol
ePosition := ((erow * 80) - 80) ecol
loop
{
result := DDE_Request("CopyBlock(" sposition "," eposition ")")
if result =
{
continue
}
break
}
return, result
}
Block132(srow, scol, erow, ecol)
{
sPosition := ((srow * 132) - 132) scol
ePosition := ((erow * 132) - 132) ecol
loop
{
result =
result := DDE_Request("CopyBlock(" sposition "," eposition ")")
if result =
{
continue
}
break
}
return, result
}
And if there is something like following would be great!
BlockVary(srow, scol, erow, ecol)
{
SizeChk := DDE_Request("OIADSPSZE") ;Operator Information Area Display Size (Fake command I just made it for the sake of example)
if Sizechk = 24X80
{
sPosition := ((srow * 80) - 80) scol
ePosition := ((erow * 80) - 80) ecol
}
if Sizechk = 27X132
{
sPosition := ((srow * 132) - 132) scol
ePosition := ((erow * 132) - 132) ecol
}
loop
{
result =
result := DDE_Request("CopyBlock(" sposition "," eposition ")")
if result =
{
continue
}
break
}
return, result
}
Thanks!
#API
#macrorumba
#Macro
#DDE
#macros
#AHK
#Script
#Rumba
#AutoHotKey