Jump to content
Macro Express Forums

Pgm Functions Library Permissions


cyberchief

Recommended Posts

To install PGM Functions Library, the user will need administrative privileges to install the applications. I know that some (most?) of the functions in the library write and read to the registry. Would running these macros require administrative privileges as well (since it will be accessing the registry)?

Link to comment
Share on other sites

Hello cyberchief!

 

Like most software, the PGM Functions Library requires administrative privileges to install because of the need to write information to the HKLM (HKEY_LOCAL_MACHINE) area of the Registry. It is also true that the registration process also requires writing to the HKLM Registry area. However, the functions themselves do not. They read and write only to the HKCU (HKEY_CURRENT_USER) area in which you, as the user, can do without needing special permissions. All of the reading and writing takes place within the HKCU\Software\Professional Grade Macros key.

Link to comment
Share on other sites

One more question on the PGM Functions... in the Date functions.. is there a way to convert the "Formated Date String" to just a "Date"? i.e. convert 20050531 to 05/31/2005? I see there is a function to do this the other way around... but I am not seeing one for this example.

Link to comment
Share on other sites

EDIT - I think you are right.

It looks fiddly; perhaps, as in the source for {Go Days}

      Variable Modify String: Copy Part of %T2% to %T11%

      Variable Modify String: Copy Part of %T2% to %T12%

      Variable Modify String: Copy Part of %T2% to %T13%

      Replace "%T2%" with "%T12%/%T13%/%T11%" in %T2%

Alternatively, there seems to be a { DateTime - Parse Day from Julian },{ DateTime - Parse Month from Julian },{ DateTime - Parse Year from Julian } etc set of functions to call?; so you don't need to call the { DateTime - Julian to Date }?

I'll await Joe's answer with interest

Link to comment
Share on other sites

Hello cyberchief and Randall!

 

There is no function to convert the formatted date string "20050531" to "05/31/2005" or any other pattern. I would suggest using something similar to the code Randall found in the {DateTime - Format Input String} function or you can use the Run Macro in Variable command to format the string to any other pattern, say "May-31-2005":

 

Variable Set String %T1% "20050531"
Variable Modify String: Copy Part of %T1% to %T3%
Variable Modify String: Copy Part of %T1% to %T2%
Variable Modify String: Copy Part of %T1% to %T1%
Variable Set String %T1% "<DT:mmm-dd-yyyyT:01:2:%T1%/%T2%/%T3%12:00:00 AM>"
Run Macro in Variable %T1%

<TVAR2:01:01:20050531><TMVAR2:10:03:01:001:004:><TMVAR2:10:02:01:007:002:><TMVAR2:10:01:01:005:002:><TVAR2:01:01:<DT:mmm-dd-yyyyT:01:2:%T1%/%T2%/%T3%12:00:00 AM>><RUNMACVAR:1>

The Run Macro in Variable command is running a dynamic Macro Express Text Date/Time command.

Link to comment
Share on other sites

there seems to be a { DateTime - Parse Day from Julian },{ DateTime - Parse Month from Julian },{ DateTime - Parse Year from Julian } etc set of functions to call?; so you don't need to call the { DateTime - Julian to Date }?

The parsing functions use the {DateTime - Julian to Date} function to convert the passed Julian Day number and then parses out the string from the result.

Link to comment
Share on other sites

I think for my application I can use the "modify string" as you do below... but I don't think I will need to use the "Run macro in variable". I am using this in conjunction with the macro that Floyd provided (for PGM libraries) to dump out 1 particular date using the 2 account bill dates). I have set it up to read off 2 dates on a spreadsheet and will have it dump out the next availabe due date. Right now, it will dump out the 20050601 date... I can use modify string and put the YYYY, MM and DD into seperate variables and use text type %T2%/%T1%/%T3% into the spreadsheet. This should work just fine. Since there are functions to convert dates in all ways but this... I thought it might be possible. I guess it is something to suggest in the other forum.

 

Thanks Joe and Randall!

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...