How can i get the while loop to enter a different loop beside the first one

I can't seem to figure out how to change the value to enter into one of the other while statements in the script. I am new to this and can't seem to find anything how to enter in the information to be able to go to different while statements and then run
what is located in that statement.
The script is supposed to let me choose between TC, MonsterLock, and Cyc and then jump to the while statement that is associated with one of them and then run what ever is located in that block. All i am getting is a infinite loop and it never sees the other
while loops. I have 3 set up the go along with the first statement but no matter what i type in for them it always looks at the first while statement and stays there.
Can someone please help me with having it do what i stated earlier.  
write-host "This script sets up DATABASE Staging"
$ProductionDistro = Read-Host -Prompt "Which production do you `enter code here`want to run?(TC/MonsterLock/Cyc)"
While($ProductionDistro -notmatch "(TC|MonsterLock|Cyc)"){
write-host "You have entered an error" -ForegroundColor Red
write-host "You must type TC or MonsterLock or Cyc"
write-host "you typed $ProductionDistro"
write-host "This script sets up DATABASE Staging"
$ProductionDistro = Read-Host -Prompt "Which production do you `enter code here`want to run?(TC/MonsterLock/Cyc)"
while($ProductionDistro -match $TC) {
write-host "Sets up location you want to run staging"
$ElementDistro = Read-Host -Prompt "Which Element do you want to run? (DATABASE1/DATABASE2/DATABASE3/DATABASE4/ALL)"
While($ElementDistro -notmatch "(DATABASE1|DATABASE2|DATABASE3|DATABASE4|ALL)") {
write-host "you have enterd an error" -ForegroundColor Red
write-host "You must type DATABASE1 or DATABASE2 or DATABASE3 or DATABASE4 or ALL"
write-host "you typed $ElementDistro"
write-host "set location you want to run staging"
$ElementDistro = Read-Host -Prompt "Which Element do you want to run? (DATABASE1/DATABASE2/DATABASE3/DATABASE4/ALL)"
While($PrductionDistro -match $MonsterLock){
write-host "Sets up location you want to run staging"
$ElementDistro = Read-Host -Prompt "Which Element do you want to run? (DATABASE1/DATABASE2/DATABASE3/DATABASE4/ALL)"
While($ElementDistro -notmatch "(DATABASE1|DATABASE2|DATABASE3|DATABASE4|ALL)") {
write-host "you have enterd an error" -ForegroundColor Red
write-host "You must type DATABASE1 or DATABASE2 or DATABASE3 or DATABASE4 or ALL"
write-host "you typed $ElementDistro"
write-host "set location you want to run staging"
$ElementDistro = Read-Host -Prompt "Which Element do you want to run? (DATABASE1/DATABASE2/DATABASE3/DATABASE4/ALL)"
while( $ElementDistro -match $DATABASE1 ){
function Execute-MySqlcommand {param( [string]$Server, #the host of the SQL server
[string]$Database1, #the name of the database
[System.Data.MySqlclient.MySqlcommand]$Command) #the command to execute (name of stored command)
$mysqlConnection = new-object System.Data.MySqlclient.MySqlConnection
$MySqlConnection.ConnectionString = "DROP_VIEW DATABASE.BTXADDR;DROP_VIEW DATABASE.BTXSUPB;CREATE_VIEW DATABASE.BTXADDR FOR DATABASE1.DATABASE1S2.BTXADDR;CREATE_VIEW DATABASE.BTXSUPB FOR DATABASE1.DATABASE1S3.BTXSUPB"
$MySqlConnection.ConnectionString = "TRUNCATE TABLE DATABASE1.DATABASE1S2.BTXADDR;TRUNCATE TABLE DATABASE1.DATABASE1S3.BTXSUPB; INSERT INTO DATABASE1.DATABASE1S3.BTXSUPB SELECT * FROM DATABASE1.DATABASE1S2.BTXSUPB; select count(*) from DATABASE1.DATABASE.BTXADDR; select count(*) from DATABASE1S.DATABASE.BTXADDR; select count(*) from DATABASE1.DATABASE.BTXSURB; select count(*) from DATABASE1S.DATABASE.BTXSUPB;"
$Command.CommandType = 1 # 1 is the 'Text' command type
$Command.Connection = $mysqlConnection
$mysqlConnection.Open()
$Result = $Command.ExecuteNonQuery()
$mysqlConnection.Close()
if ($Result -gt 0) {return $True} else {return $False}
function Execute-MySQLCommand {param( [string]$Server, #the host name of the SQL server
[string]$DATABASE1, #the name of the database
[System.Data.SqlClient.SqlCommand]$Command) #the command to execute (name of stored procedure)
$sqlConnection = New-Object System.Data.SqlClient.SqlConnection
$sqlConnection.ConnectionString = "DATABASE_CONNECT_STRING=DSN=DATABASE1;Description=DATABASE1;Trusted_Connection=Yes;WSID=Server;DATABASE=DATABASE1;DATASET=DEFAULT"
$Command.CommandType = 1 # 1 is the 'Text' command type
$Command.Connection = $sqlConnection
$sqlConnection.Open()
$Result = $Command.ExecuteNonQuery()
$sqlConnection.Close()
if ($Result -gt 0) {return $TRUE} else {return $FALSE}
function Copy-File {
#.Synopsis
# Copies all files and folders in $source folder to $destination folder, but with .copy inserted before the extension if the file already exists
param}($DATABASE0980453.pkg,"d/DATABASE1/code_stg")
# create destination if it's not there ...
#mkdir $destination -force -erroraction SilentlyContinue
foreach($original in ls $source -recurse) {
$result = $original.FullName.Replace($source,$destination)
while(test-path $result -type leaf){ $result = [IO.Path]::ChangeExtension($result,"copy$([IO.Path]::GetExtension($result))") }
if($original.PSIsContainer) {
# mkdir $result -ErrorAction SilentlyContinue
# } else {
copy $original.FullName -destination $result
cd /d/DATABASE1/code_stg
install ../DATABASE0980453.pkg
while($ElementDistro -match $DATABASE2 ) {
function execute-MySqlcommand {param( [string]$Server, #the host of the SQL server
[string]$DataBase2, #the name of the database
[System.Data.MySqlclient.MySqlcommand]$Command) #the command to execute (name of stored command)
$mysqlConnection = new-object System.Data.MySqlclient.MySqlConnection
$MySqlConnection.ConnectionString = "DROP_VIEW DATABASE.BTXADDR;DROP_VIEW DATABASE.BTXSUPB;CREATE_VIEW DATABASE.BTXADDR FOR DATABASE2.DATABASE2MS2.BTXADDR;CREATE_VIEW DATABASE.BTXSUPB FOR DATABASE2.DATABASE2S3.BTXSUPB"
$MySqlConnection.ConnectionString = "TRUNCATE TABLE DATABASE2.DATABASE2S2.BTXADDR;TRUNCATE TABLE DATABASE2.DATABASE2S3.BTXSUPB; INSERT INTO DATABASE2.DATABASE2S3.BTXSUPB SELECT * FROM DATABASE2.DATABASE2S2.BTXSUPB; select count(*) from DATABASE2.DATABASE.BTXADDR; select count(*) from DATABASE2S.DATABASE.BTXADDR; select count(*) from DATABASE2.DATABASE.BTXSURB; select count(*) from DATABASE2S.DATABASE.BTXSUPB;"
$Command.CommandType = 1 # 1 is the 'Text' command type
$Command.Connection = $mysqlConnection
$mysqlConnection.Open()
$Result = $Command.ExecuteNonQuery()
$mysqlConnection.Close()
if ($Result -gt 0) {return $True} else {return $False}
function Execute-MySQLCommand {param( [string]$Server, #the host name of the SQL server
[string]$DATABASE2, #the name of the database
[System.Data.SqlClient.SqlCommand]$Command) #the command to execute (name of stored procedure)
$sqlConnection = New-Object System.Data.SqlClient.SqlConnection
$sqlConnection.ConnectionString = "DATABASE_CONNECT_STRING=DSN=DATABASE2; Description=DATABASE2; Trusted_Connection=Yes;WSID=Server;DATABASE=DATABASE2;"
$Command.CommandType = 1 # 1 is the 'Text' command type
$Command.Connection = $sqlConnection
$sqlConnection.Open()
$Result = $Command.ExecuteNonQuery()
$sqlConnection.Close()
if ($Result -gt 0) {return $TRUE} else {return $FALSE}
function Copy-File {
#.Synopsis
# Copies all files and folders in $source folder to $destination folder, but with .copy inserted before the extension if the file already exists
param}($DATABASE0980453.pkg,"d/DATABASE2/code_stg")
# create destination if it's not there ...
#mkdir $destination -force -erroraction SilentlyContinue
foreach($original in ls $source -recurse) {
$result = $original.FullName.Replace($source,$destination)
while(test-path $result -type leaf){ $result = [IO.Path]::ChangeExtension($result,"copy$([IO.Path]::GetExtension($result))") }
if($original.PSIsContainer) {
# mkdir $result -ErrorAction SilentlyContinue
# } else {
copy $original.FullName -destination $result
cd /d/DATABASE2/code_stg
install ../DATABASE0980453.pkg
While( $ElementDistro -match $DATABASE3 ) {
function Execute-MySqlcommand {param( [string]$Server, #the host of the SQL server
[string]$DATABASE3, #the name of the database
[System.Data.MySqlclient.MySqlcommand]$Command) #the command to execute (name of stored command)
$mysqlConnection = new-object System.Data.MySqlclient.MySqlConnection
$MySqlConnection.ConnectionString = "DROP_VIEW DATABASE.BTXADDR;DROP_VIEW DATABASE.BTXSUPB;CREATE_VIEW DATABASE.BTXADDR FOR DATABASE3.DATABASE3S2.BTXADDR;CREATE_VIEW DATABASE.BTXSUPB FOR DATABASE3.DATABASE3S3.BTXSUPB"
$MySqlConnection.ConnectionString = "TRUNCATE TABLE DATABASE3.DATABASE3S2.BTXADDR;TRUNCATE TABLE DATABASE3.DATABASE3S3.BTXSUPB; INSERT INTO DATABASE3.DATABASE3S3.BTXSUPB SELECT * FROM DATABASE3.DATABASE3S2.BTXSUPB; select count(*) from DATABASE3.DATABASE.BTXADDR; select count(*) from DATABASE3S.DATABASE.BTXADDR; select count(*) from DATABASE3.DATABASE.BTXSURB; select count(*) from DATABASE3S.DATABASE.BTXSUPB;"
$Command.CommandType = 1 # 1 is the 'Text' command type
$Command.Connection = $mysqlConnection
$mysqlConnection.Open()
$Result = $Command.ExecuteNonQuery()
$mysqlConnection.Close()
if ($Result -gt 0) {return $True} else {return $False}
function Execute-MySQLCommand {param( [string]$Server, #the host name of the SQL server
[string]$DATABASE3, #the name of the database
[System.Data.SqlClient.SqlCommand]$Command) #the command to execute (name of stored procedure)
$sqlConnection = New-Object System.Data.SqlClient.SqlConnection
$sqlConnection.ConnectionString = "DATABASE_CONNECT_STRING=DSN=DATABASE3;Description=DATABASE3;Trusted_Connection=Yes;WSID=Server;DATABASE=DATABASE3;"
$Command.CommandType = 1 # 1 is the 'Text' command type
$Command.Connection = $sqlConnection
$sqlConnection.Open()
$Result = $Command.ExecuteNonQuery()
$sqlConnection.Close()
if ($Result -gt 0) {return $TRUE} else {return $FALSE}
cd /d/DATABASE3/code_stg
install ../DATABASE0980453.pkg
function Copy-File {
#.Synopsis
# Copies all files and folders in $source folder to $destination folder, but with .copy inserted before the extension if the file already exists
param}($DATABASE0980453.pkg,"d/DATABASE3/code_stg")
# create destination if it's not there ...
#mkdir $destination -force -erroraction SilentlyContinue
foreach($original in ls $source -recurse) {
$result = $original.FullName.Replace($source,$destination)
while(test-path $result -type leaf){ $result = [IO.Path]::ChangeExtension($result,"copy$([IO.Path]::GetExtension($result))") }
if($original.PSIsContainer) {
# mkdir $result -ErrorAction SilentlyContinue
# } else {
copy $original.FullName -destination $result
While($ElementDistro -match $DATABASE4 ) {
function Execute-MySqlcommand {param( [string]$Server, #the host of the SQL server
[string]$DATABASE4, #the name of the database
[System.Data.MySqlclient.MySqlcommand]$Command) #the command to execute (name of stored command)
$mysqlConnection = new-object System.Data.MySqlclient.MySqlConnection
$MySqlConnection.ConnectionString = "DROP_VIEW DATABASE.BTXADDR;DROP_VIEW DATABASE.BTXSUPB;CREATE_VIEW DATABASE.BTXADDR FOR DATABASE4.DATABASE42.BTXADDR;CREATE_VIEW DATABASE.BTXSUPB FOR DATABASE4.DATABASE4S3.BTXSUPB"
$MySqlConnection.ConnectionString = "TRUNCATE TABLE DATABASE4.DATABASE4S2.BTXADDR;TRUNCATE TABLE DATABASE4.DATABASE4S3.BTXSUPB; INSERT INTO DATABASE4.DATABASE4S3.BTXSUPB SELECT * FROM DATABASE4.DATABASE4S2.BTXSUPB; select count(*) from DATABASE4.DATABASE.BTXADDR; select count(*) from DATABASE4S.DATABASE.BTXADDR; select count(*) from DATABASE4.DATABASE.BTXSURB; select count(*) from DATABASE4S.DATABASE.BTXSUPB;"
$Command.CommandType = 1 # 1 is the 'Text' command type
$Command.Connection = $mysqlConnection
$mysqlConnection.Open()
$Result = $Command.ExecuteNonQuery()
$mysqlConnection.Close()
if ($Result -gt 0) {return $True} else {return $False}
function Execute-MySQLCommand {param( [string]$Server, #the host name of the SQL server
[string]$DATABASE4, #the name of the database
[System.Data.SqlClient.SqlCommand]$Command) #the command to execute (name of stored procedure)
$sqlConnection = New-Object System.Data.SqlClient.SqlConnection
$sqlConnection.ConnectionString = "DATABASE_CONNECT_STRING=DSN=DATABASE4;Description=DATABASE4;Trusted_Connection=Yes;WSID=Server;DATABASE=TF90PVS;"
$Command.CommandType = 1 # 1 is the 'Text' command type
$Command.Connection = $sqlConnection
$sqlConnection.Open()
$Result = $Command.ExecuteNonQuery()
$sqlConnection.Close()
if ($Result -gt 0) {return $TRUE} else {return $FALSE}
function Copy-File {
#.Synopsis
# Copies all files and folders in $source folder to $destination folder, but with .copy inserted before the extension if the file already exists
param}($DATABASE0980453.pkg,,"d/DATABASE4/code_stg")
# create destination if it's not there ...
#mkdir $destination -force -erroraction SilentlyContinue
foreach($original in ls $source -recurse) {
$result = $original.FullName.Replace($source,$destination)
while(test-path $result -type leaf){ $result = [IO.Path]::ChangeExtension($result,"copy$([IO.Path]::GetExtension($result))") }
if($original.PSIsContainer) {
# mkdir $result -ErrorAction SilentlyContinue
# } else {
copy $original.FullName -destination $result
cd /d/DATABASE4/code_st
install ../DATABASE0980453.pkg
While($ElementDistro -match $ALL ){
function Execute-MySQLCommand {param( [string]$Server, #the host name of the SQL server
[string]$DATABASE1,$DATABASE2,$DATABASE3,$DATABASE4, #the name of the database
[System.Data.SqlClient.SqlCommand]$Command) #the command to execute (name of stored procedure)
$sqlConnection = New-Object System.Data.SqlClient.SqlConnection
$sqlConnection.ConnectionString = "(DATABASE_CONNECT_STRING=DSN=DATABASE1;Description=DATABASE1;Trusted_Connection=Yes;WSID=Server;DATABASE=DATABASE1;DATASET=DEFAULT;),(DATABASE_CONNECT_STRING=DSN=DATABASE2; Description=DATABASE2; Trusted_Connection=Yes;WSID=Server;DATABASE=DATABASE2;),(DATABASE_CONNECT_STRING=DSN=DATABASE3;Description=DATABASE3;Trusted_Connection=Yes;WSID=Server;DATABASE=DATABASE3;),(DATABASE_CONNECT_STRING=DSN=DATABASE4;Description=DATABASE4;Trusted_Connection=Yes;WSID=Server;DATABASE=TF90PVS;)"
$Command.CommandType = 1 # 1 is the 'Text' command type
$Command.Connection = $sqlConnection
$sqlConnection.Open()
$Result = $Command.ExecuteNonQuery()
$sqlConnection.Close()
if ($Result -gt 0) {return $TRUE} else {return $FALSE}
install ../DATABASE0980453.pkg
While($ProductionDistro -match $Cyc) {
write-host "Sets up location you want to run staging"
$ElementDistro = Read-Host -Prompt "Which Element do you want to run? (DATABASE1/DATABASE2/DATABASE3/DATABASE4/ALL)"
While($ElementDistro -notmatch "(DATABASE1|DATABASE2|DATABASE3|DATABASE4|ALL)") {
write-host "you have enterd an error" -ForgroundColor Red
write-host "You must type DATABASE1 or DATABASE2 or DATABASE3 or DATABASE4 or ALL"
write-host "you typed $ElementDistro"
write-host "set location you want to run staging"
$ElementDistro = Read-Host -Prompt "Which Element do you want to run? (DATABASE1/DATABASE2/DATABASE3/DATABASE4/ALL)"

OK, so you've got a reasonable input loop early on:
write-host "This script sets up DATABASE Staging"
$ProductionDistro = Read-Host -Prompt "Which production do you `enter code here`want to run?(TC/MonsterLock/Cyc)"
While($ProductionDistro -notmatch "^(TC|MonsterLock|Cyc)$"){
write-host "You have entered an error" -ForegroundColor Red
write-host "You must type TC or MonsterLock or Cyc"
write-host "you typed $ProductionDistro"
write-host "This script sets up DATABASE Staging"
$ProductionDistro = Read-Host -Prompt "Which production do you `enter code here`want to run?(TC/MonsterLock/Cyc)"
I've only added two things to that code:  a ^ and $ at the beginning and end of your regex pattern.  As originally written, it would have successfully matched any string containing TC, MonsterLock or Cyc (such as "bogusTCwhatever", etc).
Now, instead of a bunch of extra While loops based on $ProductionDistro, what you need is some conditionals (either a Switch statement, or some If/ElseIf).  For example:
switch ($ProductionDistro)
'TC'
# Do TC Stuff
break
'MonsterLock'
# Do MonsterLock Stuff
break
'Cyc'
# Do Cyc stuff
break

Similar Messages

  • How can I get an album to play in order on Itunes?  The songs keep skipping all around to other albums that I did not want to listen to at that time?

    How can I get an album to play in order on Itunes?  The songs keep skipping all around to other albums that I did not want to listen to at that time?

    It sounds like you might have the shuffle button at the bottom left of the iTunes (the button with the squiggly lines).
    If that's not the case, then maybe you just need to sort your library by album by clicking the album tab at the top.
    Is your music in a playlist, or are you trying to play it from the entire library?

  • How can I get a date picker or wheel to show up in the form to make filling in a form with a lot of

    how can I get a date picker or wheel to show up in the form to make filling in a form with a lot of dates more easy?

    There is no built-in date picker available for forms created in Acrobat. There are some third-party solutions involving JavaScript (either a large collection of fields or a custom dialog) though. Also, text fields with date formatting will use a wheel type date picker on Android/iOS devices with Adobe Reader.

  • I have a DVD Acrobat Pro 9. I upgraded laptops and trying to install but the DVD is not readable. How can I get a new DVD or Download Acrobat Pro 1. The product is registered and I have the serial number. PS: Contacting Adobe on this issue is impossible..

    I have a DVD Acrobat Pro 9. I upgraded laptops and trying to install but the DVD is not readable. How can I get a new DVD or Download Acrobat Pro 1. The product is registered and I have the serial number. PS: Contacting Adobe on this issue is impossible... direct support stinks.

    Download AA 9 Pro from http://helpx.adobe.com/acrobat/kb/acrobat-downloads.html. Make a new backup for your archive. You might also take the DVD to your library to see if it is a drive problem. You might also carefully clean the DVD with water and soap (do not use anything that would scratch the surface or you have destroyed it for sure) and see if that solves the problem. This is particularly an issue if you have finger prints or other crud on the DVD. However, it could also be a bad drive as I mentioned. Hopefully the download solves your problem in any case (I would backup the download to CD and/or backup HD).

  • I have MAC OS X 10.6.8 (up-to-date). How can I get screen mirroring to my Apple TV to work?  The icon does not appear at top status bar..

    I have MAC OS X 10.6.8 (up-to-date). How can I get screen mirroring to my Apple TV to work?  The icon does not appear at top status bar..

    Welcome to the Apple Support Communities
    See > http://support.apple.com/kb/HT5404 AirPlay Mirroring is compatible with Mid 2011 and newer MacBooks Air, and OS X Mountain Lion.
    As you have Mac OS X Snow Leopard, you haven't got a compatible MacBook Air, so you can't use AirPlay Mirroring. However, you can use a third-party app as AirParrot to mirror the MacBook onto your Apple TV > http://www.airparrot.com

  • How can I get authentication and authorization through OS X open directory with the Sun ZFS STOR ZS3-2

    how can I get authentication and authorization through OS X open directory with the Sun ZFS STOR ZS3-2
    I have configure NFS, I need help configuring the share that I created in the Sun ZFS STOR ZS3-2 to connect with the OS X Open Directory

    Hi,
        You may  try checking the help page for ldap configuration :
    https://<Appliance_IP>:215/wiki/index.php/Configuration:Services:LDAP
    ZFS Storage supports LDAP, NIS, AD as directory service.
    Hope Open Directory is also based on LDAP and may work in similar fashion.
    Thanks
    Nitin

  • HT201320 How can I get TRASH to show on my 5S when I slide the email to the right? I see more & Archive

    How can I get TRASH to show on my 5S when I slide the email to the left? I see more & Archive

    Hi SCAnn!
    Here is an article that can explain that feature for you:
    iOS: Understanding Gmail Archive
    http://support.apple.com/kb/ht4207
    Thanks for being a part of the Apple Support Communities!
    Regards,
    Braden

  • I had to restore my iPhone and lost a lot of music!!! How can I get it back?! No cloud appears next to the songs, just buy!

    I had to restore my iPhone and lost a lot of music!!! How can I get it back?! No cloud appears next to the songs, just buy!

    You should be storing everything on your computer and you should always backup your computer.  Have you failed to do these things?
    If so, not good, then you can redownload some iTunes purchases in some countries.  Open iTunes store, click Purchased under Quick links

  • If I purchased a movie, from a computer a LONG time ago like 3 years but recently I changed computers how can I get that movie back? p.s. I bought the movie from iTunes

    If I purchased a movie, from a computer a LONG time ago like 3 years but recently I changed computers how can I get that movie back? p.s. I bought the movie from iTunes

    If you don't have the movie on the old computer and you don't have the movie backed up on a disc somewhere, your only choice is to purchase the movie again. Currently, movie downloads are a one time deal andit is your responsibility to have a backup copy.
    If you have the movie on the other computer still, you can burn it to a DVD and then copy it over to the new computer.
    Personally, I have two computers and when I make a purchase on one, iTunes automatically copies it to the other and I have never lost videos or music in this manner.

  • HT4623 How can I get my iPhone 4S unlocked - it's currently locked on the 3 network - 3 can't do it unless I have an account with them.

    How can I get my iPhone 4S unlocked - it's currently locked on the 3 network and they won't unlock it unless I have an account with them.

    Only 3 can authorize unlocking it. If you don't meet their conditions, then you're out of luck.

  • How can I get an album with multiple artists to display in my Nano as one album insteadof multiple albums?

    How can I get an album with multiple artists to display in my Nano as one album insteadof multiple albums?

    See this page for helpful information.
    http://samsoft.org.uk/iTunes/grouping.asp
    B-rock

  • How can I get rid of need to enter password to activate iPhone?

    How can I get rid of need to enter password to activate iPhone?

    Settings>General>Passcode Lock>Turn Passcode Off (you have to know what your passcode/password is to get into this setting, I'm assuming you do).

  • How can I get my Indesign script to apply to all pages in the document?

    My script (java) shown below will only apply to the first page of the document. How can i get it to apply to all pages of my document? What am I missing? Thanks.
    scirpt:
    myDocument = app.activeDocument
    with (myDocument.pages.item(0).marginPreferences){
    columnCount = 1;
    //columnGutter can be a number or a measurement string.
    columnGutter = "0";
    bottom = "0"
    //When document.documentPreferences.facingPages == true,
    //"left" means inside; "right" means outside.
    left = "0"
    right = "0"
    top = "0"
    inside = "0"

    Hi,
    You have to iterate through all pages.marginPreferences:
    var
      myDocument = app.activeDocument,
      allPagesMaPref = myDocument.pages.everyItem().marginPreferences,
      curPageMaPref;
    while ( curPageMaPref = allPagesMaPref.pop() )
      with (curPageMaPref) {
      columnCount = 1;
      //columnGutter can be a number or a measurement string.
      columnGutter = "0";
      bottom = "0"
      //When document.documentPreferences.facingPages == true,
      //"left" means inside; "right" means outside.
      left = "40"
      right = "0"
      top = "0"
      inside = "0"
    Jarek

  • How can I get Bookmarks to ask me in which folder to store the bookmark?

    On my other computer & my wife's computer, when I click on 'Bookmarks' I am asked which folder I want to use to store the bookmark.
    It used to work that way on this computer but now it does not ask where to save the bookmark. I just saves it in the 'Recently Bookmarked' folder.
    How can I get back to asking me which folder to use?
    Thanks for any help.

    Any chance you have the McAfee Site Advisor extension installed in Firefox? <br /> If so, disable it until McAfee fixes it.

  • How can you get back into your iPhone if you don't remember the passoword?, How can you get back into your iPhone if you don't remember the password?

    Help!   My daughter changed the password on her iPhone and she can't remember it.  How can she get back into it.  Restoring is not an option so I'm hopeful there is another way.   Thanks!

    Hey KimmyP123,
    Thanks for the question. I understand your daughter has an unknown passcode on her iPhone. The following article provides a few solutions for this situation:
    iOS: Forgotten passcode or device disabled after entering wrong passcode
    http://support.apple.com/kb/HT1212
    I notice you are looking for solutions other than restoring, the article does outline how you can use iCloud's Find My iPhone:
    If you have Find My iPhone enabled, you can use Remote Wipe to erase the contents of your device. If you have been using iCloud to back up, you may be able to restore the most recent backup to reset the passcode after the device has been erased.
    Thanks,
    Matt M.

  • HT4623 How can I get rid of this new update and go back to the previous one and how can I register a complaint with Apple?

    How can I get rid of this new 7.0.2 update and go back to the previous one and how can I register a complaint with Apple?

    You can't go back.
    You can leave feedback: http://www.apple.com/feedback

Maybe you are looking for