Need a script
I hope someone can help. AcrobatX Standard
I have a field called - remove Date1 - I fomat value date MM/DD/YY
I need to NOT allow the user to enter on Saturday or Sunday. I also need the user should NOT be able to enter holidays (a list of dates that I established)
I tell myself that I need a custom validation script and I don't know where to put this etc.
Any help would be appreciated.
Here is a script has been fixed with the holiday checking code included:
(function () { // Get the field value var sDate = event.value; // Don't do anything if the field is blank if (!sDate) return; // Convert the string to a date var d = util.scand("mm/dd/yy", sDate); // Get the day of the week var day = d.getDay(); // If it's a Saturday (6) or Sunday (0), reject it if (day === 6 || day == 0) { // Alert the user app.alert("You may not specify a Saturday or Sunday", 3); // Reject the value event.rc = false; // No need to proceed return; } // Create a date string in the mm/dd/yy format sD = util.printd("mm/dd/yy", d); // Define the holidays in an object var oHolidays = {"05/30/11" : "Memorial Day - 2011", "07/04/11" : "Independence Day - 2011", "09/05/11" : "Labor Day - 2011", "10/10/11" : "Veterans Day - 2011", "11/11/11" : "Columbus Day - 2011", "11/24/11" : "Thanksgiving Day - 2011", "12/26/11" : "Christmas Day - 2011", "01/02/12" : "New Year\'s Day - 2012", "01/16/12" : "Martin Luther King Day - 2012", "02/20/12" : "Washington\'s Birthday - 2012", "05/28/12" : "Labor Day - 2012", "07/04/12" : "Independence Day - 2012", "09/03/12" : "Labor Day - 2012", "10/08/12" : "Veterans Day - 2012", "11/12/12" : "Columbus Day - 2012", "11/22/12" : "Thanksgiving Day - 2012", "12/25/12" : "Christmas Day - 2012" }; // Check to see if the date matches a holiday if (sD in oHolidays) { // Alert the user app.alert("You entered: " + oHolidays[sD] + "\r\rYou may not specify a Holiday.", 3); // Reject the value event.rc = false; // No need to proceed return; } })();
Tags: Acrobat
Similar Questions
-
I need a script that would provide leading to different text blocks.
Hello
I need a script that would change with each attack of text frame. Is it possible to make a?
This this example script that works on a selection of blocks of text:
#target illustrator
function test() {}
var doc = app.activeDocument;
var s = doc.selection;
If (s == null & s.length == 0) {}
return;
}
for (var i = 0; i)< s.length; ="">
If (.) S [i] TypeName! = "TextFrame") {}
continue;
}
s [i].textRange.characterAttributes.autoLeading = false;
s [i].textRange.characterAttributes.leading = 22;
};
};
test();
-
Need a script to connect to multiple hosts and clear on the same vsan
Hi Experts,
I need a script (python / shell) connect to multiple esxi hosts and run the commands below.
set automode storage vsan esxcli - active = false
list of VSANs esxcli storage | grep-B4 "SSD: true.
storage of vsan esxcli remove naa.* s
esxcli vsan cluster leave
Could you please hel, thanks in advance.
You can try something like this
Get-VMHost | %{
Game-VMHost - VMHost $_-maintaining state-confirm: $false
$esxcli = get-EsxCli - VMHost $_
$esxcli.vsan.storage.automode.set ($false)
$esxcli.vsan.storage.list () | where {$_-match 'SSD'} | %{
$esxcli.vsan.storage.remove($_)
}
$esxcli.vsan.cluster.leave)
Game-VMHost - VMHost $_-connected state
}
-
He
work on some textbooks of mathematics. text is written in the word with many mathtype equations and imported in indd.
some inline equations have space around, some don't.
need a script to clean it. hold 1 space around each equation (before and after).
Thank you
Then, test the ExtendScript (JavaScript):
// InsertSpaceBEFORE-AFTER-Anchored-GraphicFrame-v4.jsx // Uwe Laubender // NOTE: Text in tables or text in footnotes will ALSO be handled. /** * @@@BUILDINFO@@@ InsertSpaceBEFORE-AFTER-Anchored-GraphicFrame-v4.jsx !Version! Sun Jan 10 2016 15:56:14 GMT+0100 */ app.findGrepPreferences.findWhat = app.changeGrepPreferences.changeTo = ""; // Here we could also look after "
" with a text search! // A GREP search for "\\x{FFFC}" will ALSO work. app.findGrepPreferences.findWhat = "~a"; var whatToAddBefore = " "; // A single space var whatToAddAfter = " "; // A single space // The focus is on our active document: var doc = app.documents[0]; // Let's find every anchored object in the document in reverse order: var foundResults = doc.findGrep(true); // We are not interested in anchored text frames, anchored buttons etc.pp. // Just in anchored graphic frames, that contain graphics. // We could refine that even more, if we like. // So we loop the found special characters: for(var n=0;n Who should do it for you.
You can remove the double and triple spaces thereafter.
Uwe
-
Good morning friends,
So for my work, I need a script to open files with the same name but located in a different folder. But since I'm a total noob when it comes to programming, I can't understand how do. That's what I have in mind:
-J' I manually open an image.
-The script will look for a file with the same name in another folder that I've specified.
-The script will then select the channel CMYK of the second file and copy and paste it into the first file.
-The second file is then closed without saving the changes.
I have problems with the part where the script searches for a file with the same name as the opened file. I would really appreciate help. Thanks in advance.
If (app.documents.length > 0) {}
myDocument var = app.activeDocument;
var Nomdoc = myDocument.name;
try {var basename = docName.match (/(.*)-.)} [ ^\.] +$/)[1]}
catch (e) {var basename = thedoc.name};
var path = / * path of folder to insert as a string here * / + ' / ' + base name + / * insert file extension, including the period as a string here * /;
If (queue (path) .exists == true) {var otherDocument = app.open (File (path))};
};
-
need a script to get the news of VMs who believed map
Hi guys
I need a script to get the info of VMs who believed the data center map...
Like this
name of the virtual machine
name of the cluster
ESXi host ip
name of the disk... (if it is disk 1 or 2)
name of the data store
NNA
I used the script below, but I am unable to store data name, cluster and host Info
Get
-VM
| Get
-HardDisk
-DiskType
"RawPhysical"
,
"RawVirtual"
|
Select
Parent,Name,DiskType,ScsiCanonicalName,DeviceName |
fl
Please suggest any modified script to get above information..
Try like this
Get-VM | Get-HardDisk -DiskType "RawPhysical","RawVirtual" |Select Parent,Name,DiskType,ScsiCanonicalName,DeviceName, @{N="Datastore";E={$_.Filename.Split(']')[0].TrimStart('[')}}, @{N="VMHost";E={$_.Parent.Host.Name}}, @{N="Cluster";E={Get-Cluster -VM $_.Parent | Select -ExpandProperty Name}}
-
Need a script to change the password of admin for all the VMs (windows)
Need a script to change the password of admin for all the VMs (windows)
Hi LucD,
Need your help about changing the password to root for Linux VM.
It throws the following error when I run on Linux VM
Invoke VMScript: 10/04/2013-16:52:02 Invoke VMScript Could not authenticate with the guest operating system by using the supplied credentials. Thank you
Suresh
-
Need a script to a fast line to disable SIOC on all storages attached to a vCenter data
Need a script to a fast line to disable SIOC on all storages attached to a vCenter data
Hello, vmwaredownload-
If you just want quick and dirty and know that all your data warehouses are able IGCS, you can use these few lines (you can join to the same line, separated by semicolons, if you really need a single line):
$viewStorageRM = Get-View -Id "StorageResourceManager-StorageResourceManager" ## get the Storag Resource Manager view$spec = New-Object VMware.Vim.StorageIORMConfigSpec -Property @{"Enabled" = $false} ## create the config specGet-Datastore | %{$viewStorageRM.ConfigureDatastoreIORM_Task($_.Id, $spec)} ## for all datastores, disable SIOC
Which does not check if the data store is capable of IGCS, or if it is already off - he just goes and tries to disable SIOC on all data warehouses.
To learn more, if you're interested, AC talked about allowing people with disabilities/IGCS in his vNugglets.com post earlier.
How these three lines do for you?
-
Need a script powercli on behalf of user ESXi servers list
Need a script powercli on behalf of user ESXi servers list
My mistake, try something like this
$user = "root" $pswd = "password" Get-VMHost | %{ $esx = Connect-VIServer $_.Name -User $user -Password $pswd Get-VMHostAccount -Server $esx | Select @{N="Host";E={$esx.Name}},@{N="Uid";E={$_.ExtensionData.Id}},Id,@{N="Name";E={$_.ExtensionData.FullName}} Disconnect-VIServer -Server $esx -Confirm:$false}
-
Need a script to disable the copy/paste in virtual machines
Need a script to disable the copy/paste in virtual machines
=================
Begin {}
$disableCopy = "isolation.tools.copy.enable".
$disableCopy_value = "false".
$disablePaste = "isolation.tools.paste.enable".
$disablePaste_value = "false".
$disableGUI = "isolation.tools.setGUIOptions.enable".
$disableGUI_value = "false".
}{In process
#Make of course, it's a virtual machine
If ($_ - isnot [VMware.VimAutomation.Client20.VirtualMachineImpl]) {co continue}#Setup our object
$vm = get-view $_. ID
$vmConfigSpec = new-Object VMware.Vim.VirtualMachineConfigSpec
$vmConfigSpec.extraconfig += new-Object VMware.Vim.optionvalue
$vmConfigSpec.extraconfig += new-Object VMware.Vim.optionvalue
$vmConfigSpec.extraconfig += new-Object VMware.Vim.optionvalue
$vmConfigSpec.extraconfig [0]. Key = $disableCopy
$vmConfigSpec.extraconfig [0]. Value = $disableCopy_value
$vmConfigSpec.extraconfig [1]. Key = $disablePaste
$vmConfigSpec.extraconfig [1]. Value = $disablePaste_value
$vmConfigSpec.extraconfig [2]. Key = $disableGUI
$vmConfigSpec.extraconfig [2]. Value = $disableGUI_value
#Run change
$vm. ReconfigVM ($vmConfigSpec)
}=================
The script above did not work. This script must run on VMs specified in a cluster that is mentioned.
As long as vmhgfs is not installed in your virtual machines during the installation of the tools in 5.0, copy and paste between virtual machines is not enabled by default
-
need a script to find vmware tools does not not on virtual machines
I need a script to find the virtual machines running without vmware tools?
Hello, nareshunik-
You can add an extra point to the filter to include only the virtual machines that are on, as:
## get names of powered-on VMs that either do not have Tools installed, or on which Tools are not currently runningGet-View -ViewType VirtualMachine -Property Name, Guest.ToolsStatus -Filter @{"Guest.ToolsStatus" = "toolsNotInstalled|toolsNotRunning"; "Runtime.PowerState" = "PoweredOn"} | Select Name, @{n="ToolsStatus"; e={$_.Guest.ToolsStatus}}
How does do for you?
-
Need a script for details of free space Datastore
Hello
I need a script to get the name of Datstore, capacity in GB and free space in GB based on each cluster.
Thanks in advance.
If you change the last line of the script in:
} | Export-Csv -Path Datastores.csv -NoTypeInformation -UseCulture
He's going to write the output to a file called Datastores.csv.
-
I need a script code that reflect each layer in a prayer group!
Currently the command use the pivot point for the transformation on the right side of the Center, you can change this line:
bcm_mirrorAllCH (getSelectedLayersIdx (), "CR", "Horizontal");
with this:
bcm_mirrorAllCH (getSelectedLayersIdx (), "CC", "Horizontal");
-
Need powershell scripts to collect information from vm disk
Hello
I need two scripts to collect information from vm drive,
1 script to collect information vm disk mode
Expected results:
The virtual computer name. Name of ESX. Cluster name | VMDK name | Device label. disksizeInGB | diskmode
Disc-> Just need the info as persistent or independent_persistent mode
2. script to collect info RDM of Vm
Expected results:
The virtual computer name. Name of ESX. Cluster name | DeviceName | File name | Compatibility mode | Size
The first script
Get-VM | %{ $vm = $_ $vm | Get-HardDisk | %{ $_ | select @{N="VM";E={$vm.Name}}, @{N="ESX";E={$vm.Host}}, @{N="Cluster";E={(Get-VMHost $vm.Host | Get-Cluster).Name}}, @{N="VMDK";E={$_.Filename}}, @{N="Device Label";E={$_.Name}}, @{N="disksizeInGB";E={"{0:N1}" -f ($_.CapacityKB/1MB)}}, @{N="Diskmode";E={$_.Persistence}} } } | ft -AutoSize -Force
____________
Blog: LucD notes
Twitter: lucd22
-
Need a script Powershell inventory VM
Hello
Need a script powershell to collect them below, has held information from the virtual Center.
vmname | Name of ESX. Memory (GB) | County of vCPU | vNIC County | IP address (all) | VMDK (s) size (GB) | Total size (GB) vmdk | Name of the data store. The Tools version. to update the tools | actions | Reservations (MB) | Limit (MB) | County snapshot | Guest operating system
VMDK (s) size (GB)-> need all size vmdk from the separated from the vm by ''. EX: for a virtual machine of 3 size vmdk 20,20, 10 GB each the output would be 2020 + 10
The name of the data store-> name of the data store where the VMX.
Update of the tools-> State of necessity as old or updates
You will find the combined VM version of script 3 attached information. If you want only some of the fields, as in the VMX and VMDK script, you can use the Select-Object cmdlet to select only the fields. The next oneliner will use the script Get-information - v3.ps1 to generate the output of the VMX and VMDK script:
./Get-VMInformation-v3.ps1 | Select-Object -property VMname,VMXName,VMDKName,VmdkSizeGB,TotalVmdkSizeGB,DatastoreName
Robert
-
Need a script "Convert bullets and numbering in text.
Hello
Need a script "Convert bullets and numbering in text.
Hasvi,
You can use the method "convertBulletsAndNumberingToText ()".
for example app.activeDocument.stories.everyItem () .convertBulletsAndNumberingToText ();
It converts the bullets and numbering to text in all the stories of active document (notes and tables will be separately).
~ Green4ever
Maybe you are looking for
-
I'm selling my iphone and I do not know my restrictions pass code and I can so delete or reset my phone. I was wondering how can I delete all my information out of the phone without the use of restriction code or how to reset restriction code I have
-
"PWBKBACK MFC Application has encountered a problem and needs to close."
The error signature: APPName: pwbkback.exe AppVer: 1.0.0.53 ModName: unknown ModVer: 0.0.0.0 Offset: 00737077 I have used this program PsiWin successfully for years. All of a sudden I get this error message which I think is related to some Microsoft
-
Please give me the detais how remote desktop broadband bandwidth services (RDP) takes on the internet / WAN and under what conditions (XP, 2003, 2008)?
-
I have mozilla firefox in my programs, I accidentally deleted it how I set in the program?
-
a member of the family of mine has little security and is not very well informed when it comes to computers. to help I'll install something for them. I thought: free online armor firewall AVG free antivirus (real-time scanning)? MBAM (on request) fre