Jump to content

Referencing each OS Architecture individually via Else If Conditional Statement


Recommended Posts

Hello,

The @OSArch Macro references 3 types of Architecture:

"X86", "IA64", "X64"

Since there are 3 OS architecture types I best believe that the following

else if Conditional Statement Syntax best deals with making the proper ultimate distinction between the three:

Sntax:

if (condition1) {
    block of code to be executed if condition1 is true
} else if (condition2) {
    block of code to be executed if the condition1 is false and condition2 is true
} else {
    block of code to be executed if the condition1 is false and condition2 is false
}

While being lately engaged in trying to reference each OS Architecture individually for a coding I was working on
I had come across an old post with what I strongly believe to be insufficient reply by its Moderator.

One of the new forum members had wanted to reference a 32 bit OS architecture individually
and was given incomplete coding.

I therefore believe this new forum member was right in being so very unsatisfied from the answer he was provided.

This is the answer with Insufficient Coding Distinction in the Else Statement:
------------------------------------------------------------------------------------------------------
The following:
Else Statement does not distinctly reference a 32 bit,
as it could also reference an IA64 bit:

If @OSArch = "X64" Then
    ;Do Something for 64bit machines
Else
   ;Do Something for 32bit machines ; Insufficient Else detection code as could also reference "IA64" bit (Hillary)

This above example was provided by:
MODERATOR: JLogan3o13

 

So for the benefit of the distinguished AutoIt Forum members, here is the following
Architecture Referencing code I have written for EACH OS INDIVIDUALLY

which singles out and properly identifies the requested 32 bit OS as it should be in the Else Statement

-----------------------------------------------------------------------------------------------------------------------------------------

#include <MsgBoxConstants.au3>

If @OSArch = "X64" Then
;Do Something for 64 bit machines
MsgBox($MB_SYSTEMMODAL, "condition1 is true", "64 bit version Detected !", 10)

ElseIf @OSArch = "IA64" Then
;Do Something for IA64 bit machines
MsgBox($MB_SYSTEMMODAL, "condition1 is false and condition2 is true", "IA64 bit version Detected !", 10)

Else
   ;Do Something for 32 bit machines
   MsgBox($MB_SYSTEMMODAL, "condition1 is false and condition2 is false", "32 bit version Detected !", 10)
EndIf

 

Dear Forum Members if any of you have any other suggestions please feel completely free
to present them on this post.

bye,

Hillary.

 

inventor_explaining_schematics_md_wht_st.jpg

Link to comment
Share on other sites

  • Moderators

Hillary (or should I say dzur),

Quote

I therefore believe this new forum member was right in being so very unsatisfied from the answer he was provided.

A funny way to refer to yourself, using the third person.....

As you have probably not bothered to read the Forum rules in either of your personae, let me highlight one of them for you:

Quote

6. Do not create multiple accounts

And I would add that doing exactly that to post less than complimentary remarks about the help you were receiving and to openly criticize a moderator does nothing to endear you to our community. I will let JLogan3o13 decide what to do with you when he is next online - until then, this thread is closed and I suggest you do not post again.

M23

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind

Open spoiler to see my UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Link to comment
Share on other sites

  • Moderators

@hillary, @dzur, as stated in the PMs, we will let the situation lie for the time being. If you wish to be a member of this forum, you'll lose the attitude and the arrogance, and start fresh. If you cannot do that, you won't be welcome here.

"Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball

How to get your question answered on this forum!

Link to comment
Share on other sites

  • Moderators
Quote

lose the attitude and the arrogance, and start fresh

As the OP proved categorically in several PM exchanges with the Moderation team that he would (or could) not do this, the accounts concerned have been banned.

M23

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind

Open spoiler to see my UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...