Use OS Architecture for processing

Advanced Macro Recorder/Editor.

Moderator: Pulover

click-click
Posts: 24
Joined: 18 Oct 2013, 06:35

Use OS Architecture for processing

01 Nov 2020, 15:36

Depending on the current OS being 32-bit or 64bit, I would like to launch an app with the respective 32-bit or 64-bit exe
Is there a way to do this with PMC?
User avatar
Xtra
Posts: 2750
Joined: 02 Oct 2015, 12:15

Re: Use OS Architecture for processing

01 Nov 2020, 15:54

check this built in var:

Code: Select all

A_Is64bitOS
[v1.1.08+]: Contains 1 (true) if the OS is 64-bit or 0 (false) if it is 32-bit.
HTH
click-click
Posts: 24
Joined: 18 Oct 2013, 06:35

Re: Use OS Architecture for processing

01 Nov 2020, 17:00

Thanks, but I'm not sure how to translate that using pmc code. I.e.

If A_Is64bitOS == 1 Then (any_x64.exe)
Else (any_86.exe)
End If
Last edited by click-click on 01 Nov 2020, 17:21, edited 2 times in total.
User avatar
Xtra
Posts: 2750
Joined: 02 Oct 2015, 12:15

Re: Use OS Architecture for processing

01 Nov 2020, 17:05

Example:

Code: Select all

if (A_Is64bitOS)
	Run, any_x64.exe
else
	Run, any_86.exe
click-click
Posts: 24
Joined: 18 Oct 2013, 06:35

Re: Use OS Architecture for processing

01 Nov 2020, 17:40

Yes, but I don't see how to enter the code into the .pmc macro. Under the if statements, I don't see entries where you can add the logic shown above. The only entry I see is evaluate expression or compare variables I guess you could say I'm confused. :oops:
User avatar
Pulover
Posts: 612
Joined: 29 Sep 2013, 19:51
Location: Brazil
Contact:

Re: Use OS Architecture for processing

01 Nov 2020, 18:35

You can use either of them.

Code: Select all

[PMC Code v5.3.3]|F3||1|Screen,2,Fast,0,1,Input,-1,-1,1|1|Macro1
Context=None||None|
Groups=Start:1
1|Evaluate Expression|A_Is64bitOS|1|0|If_Statement|||||1|
2|Run|any_x64.exe|1|0|Run|||||3|
3|[Else]|Else|1|0|If_Statement|||||4|
4|Run|any_x32.exe|1|0|Run|||||7|
5|[End If]|EndIf|1|0|If_Statement|||||8|

Rodolfo U. Batista
Pulover's Macro Creator - Automation Tool (Recorder & Script Writer)
click-click
Posts: 24
Joined: 18 Oct 2013, 06:35

Re: Use OS Architecture for processing

01 Nov 2020, 19:41

Thanks, I was confused using the interface. I thought I had to add all of the logic using only the Evaluate Expression interface. I never used If statements with PMC before. :roll:

Return to “Pulovers Macro Creator”

Who is online

Users browsing this forum: No registered users and 57 guests