Skip to main content

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

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

Please see below the description of the requested messages:

FLEN

This Request/Advise message type returns the length of the field located at position. The following table shows the possible contents for type. If you type a single character, for example P, you must follow it with a blank to make up the two-character code

FPOS

This Request/Advise message type returns the position of the field you specify. The position is the location of the beginning of the field whose position you want to find. The following table shows the possible contents for type. If you enter a single character (for example, P) you must follow it with a blank to make up the two-character code.

Please contact Micro Focus SupportLine if you need additional information.


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

So this is the function I made in yellow.  So I call it like shown in lime and it will pull the entire field so you don't get extra tab in your data if you happen to call outside of a field boundary. 

ClientName := AutoBlockUni(8,18)

msgbox, The following Clients name is %ClientName%

AutoBlockUni(row, col)
{
result =
while OIAReady = 0
{
OIAReady := DDE_Request("OIAReady") ;Returns 1 if The host session is ready
}
OIAKBD = 1
while OIAKBD = 1
{
OIAKBD := DDE_Request("OIAKBD") ;Returns 1 if Interface is on Keyboard Hold
}
loop
{
AutoStart := DDE_Request("FPos(T" A_space "," Row "," Col ")")
AutoEnd := DDE_Request("FLen(T" A_space "," Row "," Col ")") AutoStart
result := DDE_Request("CopyBlock(" AutoStart "," AutoEnd ")")
if result =
{
continue
}
break
}
return, Result
}