marshach
-
Posts
3 -
Joined
-
Last visited
Content Type
Profiles
Forums
Events
Posts posted by marshach
-
-
I recently learned about the so-called "Monty Hall" problem. Like many people, I found it hard to believe that you have a better chance of winning if you switch doors. So, it occured to me that I could "prove" it to myself by writing a macro. Here it is, and it works! (Woo hoo!) (I'm not a professional macro writer. There might be a more efficient way to write a macro to demonstrate the problem.) (Direct edit text attached)
// N1 is your decision to keep your original door or switch doors
// N2 is the winning door
// N3 is your original door choice// N4 is the number of times you win
// N5 is the number of times you lose
// T1 is your decision to keep your original door or switch doors
// T2 is the winning door
// T3 is your original door choice// A=Keep, B=Switch
Multiple Choice Menu: Keep or Switch?
If Variable %T1% = "A"
Variable Set Integer %N1% to 0
Else
Variable Set Integer %N1% to 1
End If
Repeat Start (Repeat 1000 times)
// N2 (also T2) is the *winning* door (set randomly)// Maxium Random Value set to 2. (0=door A, 1=door B, 2=door C)
Variable Set Integer %N2% with a Random Number
If Variable %N2% = 0
Variable Set String %T2% "Door A"
End If
If Variable %N2% = 1
Variable Set String %T2% "Door B"
End If
If Variable %N2% = 2
Variable Set String %T2% "Door C"
End If
// N3 (also T3) is your original door choice (set randomly).// Maxium Random Value set to 2. (0=door A, 1=door B, 2=door C)
Variable Set Integer %N3% with a Random Number
If Variable %N3% = 0
Variable Set String %T3% "Door A"
End If
If Variable %N3% = 1
Variable Set String %T3% "Door B"
End If
If Variable %N3% = 2
Variable Set String %T3% "Door C"
End If
// N1 is your decision (0 = Keep the original door), (1 = Switch doors)
// If you keep the original door
If Variable %N1% = 0
// ...and you had originally picked the winning door
If Variable %T2% = variable %T3%
// You win :-)
Variable Modify Integer: %N4% = %N4% + 1
Else
// ...and you had originally picked a losing door
// You lose :-(
Variable Modify Integer: %N5% = %N5% + 1
End If
Else
// If you switch doors// ...and you had originally picked the winning door
If Variable %T2% = variable %T3%
// You lose :-(
Variable Modify Integer: %N5% = %N5% + 1
Else
// ...and you had originally picked a losing door
// You win :-)
Variable Modify Integer: %N4% = %N4% + 1
End If
End If
Repeat End// Wins = %N4%, Losses = %N5%
Text Box Display: Wins and losses -
I am searching for an answer to this question. I found this post, but it is over two years old.
Does anyone know of anyone to change the size of the font in the box that appears when a user is prompted for input?
Internet Web Site command slow to open tab in Firefox
in Macro Express 3.x
Posted
I have a few macros for logging on to various web sites. For each of these these macros, I use the Internet Web Site command to open the web page. I always have Firefox open before I start the macro, so Firefox just needs to open a new tab. For some there is a long delay before the new tab opens. I don't know if the problem is with Macro Express or with Firefox. Has anyone else encountered this problem? chuckm1964@hotmail.com