×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Macro usage in Service Center
2

Macro usage in Service Center

Macro usage in Service Center

(OP)
Has anyone used a macro facility is service center called scmacro.exe that is in the RUN directory. It basically records steps one does in service center and handles the various clicks you do. I have come across uasage like TRANSACT, STEFOCUS, GETVALUE, system parameters like SYSFORMNAME, SYSPARM0 etc.

Anyone has experience in using those functions? Any documentation have you come across?

Thanks

RE: Macro usage in Service Center

2
Hi,

I have played around with it a bit but have not come across any documentation for it.

Actually some months back the answer from Peregrine was that the macro recorder function is not an offically supported product and does not have documentation as such.

On the other hand, Peregrine does currently have an SCR open because of a request for documentation for this product (SCR number: 24866). I recommend that you refer to this SCR if you plan to request information about the product from Peregrine.

Below URL also mentions the product:
http://www.sc-resources.net/viewtopic.php?t=240

cheers

RE: Macro usage in Service Center

(OP)
If you could post some of the different macro's you have used whcih uses different commands, it will help me in understanding a bit more. I am puzzled by the usage of TRANSACT which takes an integer paramater like 0, 20, -26 etc ... I am not sure to its consitent usage ... I am sure it must be something like a commit/execute ...

Also, since I do not have access to the URL you have mentioned, is there a way to post it otherwise

Thanks

RE: Macro usage in Service Center

sorry, I forgot that you would have to register with http://www.sc-resources.net/ before you can access the page.

(sc-resources.net is a site dedicated for Peregrine products, albeit not otherwise affiliated with PRGN)

I probably better point out as well that there is not that much technical information about the Macro recorder at that site. As far as I know, the only location where such info could be obtained from is Peregrines development team...and as it is now, they are not speaking.

Another issue is that I have just played around with it...and this was some time ago...so I do not have any scripts available at the moment. But I can look into this, no problems (it's kind of interesting anyway).

RE: Macro usage in Service Center

just noticed something...

as to the transact values, I do not know if this is what you referred to but here it is anyway:

If I create a short macro that adds a company record, the steps in the .vbs file look like:

<snip>
' Begin transaction number 1 at form 'menu.gui.home'
  sc.Transact(35)
' end Transaction
  r = sc.SetFocus( "customer.id" )
'
' Begin transaction number 2 at form 'company.g'
  sc.Transact(6)
' end Transaction
'
' Begin transaction number 3 at form 'company.qbe.g'
  r = sc.SetValue( "SYSPARAM0", "4" )
  sc.Transact(0)
' end Transaction
  r = sc.SetFocus( "company.full.name" )
'
' Begin transaction number 4 at form 'company.g'
  r = sc.SetValue( "customer.id", "00005" )
  r = sc.SetValue( "company", "ACPE" )
  r = sc.SetValue( "company.full.name", "ACPE, INC." )
  sc.Transact(1)
' end Transaction
  r = sc.SetFocus( "customer.id" )
</snip>

I noticed that the values that are specified in the parenthesis directly following the term "sc.Transact" correspond to the button ID values (or option values) for the button to be executed. For example, under "transaction number 1" we have the command "sc.Transact(35)". The number 35 here corresponds to the "Option #" specified for the "Companies" button on the "menu.gui.home" form.

The numbers shown in subsequent transactions correspond to the GUI Option number in the Display Screen at that point.

cheers,

RE: Macro usage in Service Center

(OP)
Thanks for the info.

RE: Macro usage in Service Center

another thing I noticed is that the macro created by the macro editor can also be used from Excel. This can be seen as follows:
1. record a macro .vbs file
2. open the .vbs file in e.g. notepad
3. copy the entire text to clipboard
4. open Excel (this example uses v.2002)
5. click on Tools > Macro > Macros
6. give the macro a name and click on "Edit"
(Microsoft Visual Basic window opens)
7. paste the clipboard contents into the Module window
8. close the Visual Basic window
9. click on Tools > Macro > Macros
10. select the your new macro and click on "Run"

I have only tested this on one macro but it looks as if the vbs code created by scmacro.exe is compatible with Excel's code.

hope this helps

RE: Macro usage in Service Center

FYI: scmacro.exe is likely not going to be included in future versions of ServiceCenter.

RE: Macro usage in Service Center

FYI 2: this is an excerpt of something I had posted at another forum, but thought that it might come useful to someone reading this thread as well:

scmacro.exe can be launched by pressing CTRL+SHIFT+M while the ServiceCenter GUI window is open. It's main functionality is to record a users activities in SC onto a .vbs file for the purpose of replaying them later. This can be useful when creating scripts for e.g CTI (Computer-telephone integration).

scmacro.exe records the activities using a set of functions that are exposed by a SC activex server component called "servicecenter.exe" (also by default in the ../RUN folder). The list of exposed functions are as follows:

-GetValue(FieldName As String) As String
-GetValueByRef(FieldName As String, FieldValue As String) As Integer
-SetFocus(FieldName As String) As Integer
-SetValue(FieldName As String, FieldValue As String) As Integer
-StartMacro(MacroFileName As String) As Integer
-StillActive() As Integer
-StopMacro() As Integer
-SystemEvent(EventString As String, EventParms As String) As Integer
-Transact(ButtonId As String) As Integer

NOTE: In order to succesfully execute these actions against ServiceCenter, the "servicecenter.exe" component must have been registered in the Windows system (normally happens during installation, otherwise use the Windows "regsvr32" tool). Another requirement is that the ServiceCenter client must be 'up and running' on the system (which means that the actions can only be executed on the FOREGROUND).

Best regards,

Jarmo

RE: Macro usage in Service Center

I've been playing around alot with the macro's in SC, is there a way to map them to a shortcut key though, like Ctrl+1, Ctrl+2, etc.  They are easy enough to create but running multiple ones is a pain without shortcuts.  I realize this isn't supported but I was just wondering if someone had a solution.

RE: Macro usage in Service Center

Does anyone have any know how to use a VARIABLE in SC.MACRO.

Al I can use is SC.SETVALUE. I want to use an INPUTBOX and use the value of that box in an INCIDENT ???

Thanks

RE: Macro usage in Service Center

You could declare a string variable, pass the value of inputbox to the string variable and use in the script

eg:

dim str as string
str= userform.textbox.text
sc.SetValue("contact.name", str)

It should work !!!

RE: Macro usage in Service Center

It's been driving me nuts with that active-x error when trying to runn the scmacro.exe program. Thanks fro letting me know I have to register the servicecenter.exe file. I have been reguistering every other file but that one. Thanks a lot!! http://www.desktopsupport.tv

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close