Script ideas / help
IPCCX 3.5 supports the requirements of following debit call and if yes for tips on writing the script will be greatly appreciated
Here is the configuration and the flow of calls for this site:
21 officers divided into 7 teams with 3 agents in each team
Each agent has its own 800 number.
Two main 800 numbers
Guests can call their own direct agent using the agent? s 800 number but if their agent is not ready the call should be routed to an agent the team officer called. However if all agents of this specific team are not ready, the call should be routed to any loan officer. If no agents are ready the appeal should sit in the queue for an agent.
Also, customers can call using one of the 800 numbers and the call will be forwarded to a queue or loan officer if anyone is ready
Hello
If you use IPCC Express Enhanced try the following
(1) create 23 CSQ
(2) create 23 triggers using the 0800 23 numbers
(3) create 22 skills. Each jurisdiction will be relacionated with each 0800 number
(4) associated with each of the 21 skills exact CSQ.
(5) for each team, put the senior officer with more skills than the other two.
(6) Finally, for both 800 numbers use the 22 jurisdiction (all agents with the same value) and associate it with the QSC 22 and 23.
André Lomonaco
Tags: Cisco Support
Similar Questions
-
I filled my printer with an hp1200 cartridgeworld cartridge and now the printer always says "check printer cartridge? any ideas help please, PS is not the first time I used these cartridges, but this is the first time I had no problem
Hello
Follow these steps and check if that helps:
Method 1:
Try to run the printer Troubleshooter and check that if it helps, here is the link:
http://Windows.Microsoft.com/en-us/Windows7/open-the-printer-TroubleshooterMethod 2:
Try to run the below fixit and check if this may help:
http://Windows.Microsoft.com/en-us/Windows7/why-cant-I-printIt will be useful.
-
Scripts to help AP GL reconciliation
I need some scripts to help me reconcile AP to GL.
I hope that help you
SQL query to drilldown AP invoice, payment, details of newspaper
Concerning
-
Calculation of Script - Please help.
Hello
I'm working on a calculation script, but unfortunately not in yet. Can someone help me please by giving some ideas on how this can be done?
There is a 'Place' dimension attribute and its basic dimension is "Customer."
For example:
Customer dimension has 15 members - C1 to C15.
The attribute dimension has 5 members - Loc1 to Loc5.
Customer
-Total (level 1 - the value ignores member)
-Loc1 - Total
-Loc2 - Total
-Loc3 - Total
-Loc4 - Total
-Loc5 - Total
-All clients (member of level 2)
-C1 (East with attribute Loc1) (value = 10)
-C11 (member of level 0)
-C12 (member of level 0)
-C2 (is with attribute Loc2)
-C3 (is with attribute Loc3)
-C4 (Loc4)
-C5 (Loc5)
-C51 (member of level 0)
-C52 (member of level 0)
-C6 (Loc1) (account value = 20)
-C7 (Loc2)
-C8 (Loc3)
-C9 (Loc4)
-C10 (Loc1) (account value = 20)
I need something like this:
Account-> "Loc1 - Total" = A account-> account A + C1-> account-> C10 A + C6;
I.e. A account values for 3 guests (C1 + C6 + C10) that are associated with the attribute "Loc1" should be added and kept in "Loc1 - Total" and the same for all the others like "Loc2 - Total" etc..
In the example above, the value of the account to the "Loc1 - Total ' should be equal to 50 (only C1 = 10, C6 = 20, C10 = 20)
Can someone please help by giving their ideas? Thanks in advance.
-Krrish
Published by: Krrish on June 19, 2012 12:30What is the error you get? I guess it's that you don't have the formula in a block calco
TryDIFFICULTY (mentioned all required members of all dimensions, with the exception of the dimension B, @ATTRIBUTE ("Loc1"))
("Account has")"Account has"-> "Loc1 - Total" = "account has"-> "Loc1 - Total" + "account has";
)ENDFIX;
-
IPCC Express scripts minor Help Needed
Hi Pros,
The script that I created is attached. I have 3 groups of resources. Each assigned to a CSQ (so 3 CSQs too). Now, I need to configure the script such as whether agents CSQ 2 and 3 (nonapplications & material) are busy while the appellants are held in the queue, but if the agents are connected to or not is not ready so call should be redirected to CSQ 1 (applications). I don't really know if this is possible and how to configure it. Any help will be most appreciated.
Pratik
The attached script earlier is in 3.5.2 version. In the case where you cannot not open, attached is a screenshot of the same thing.
Please rate of messages
-
Hi people, new user here.
Have a text field I want to be hidden until one of the two radio buttons in a group has been selected. Any help is greatly appreciated.
Rick S/San Antonio, TX
You can do this in different ways. Here is an example. Use the following the calculation script customized in your text field that must be hidden or shown:
var f1 = this.getField("Group1"); var shouldBeVisible = (f1.value != "Off"); event.target.display = shouldBeVisible ? display.visible : display.hidden;
This can be shortened a bit, but the shorter code is not necessarily more readable. If you have problems to understand what is happening here, please see the core JavaScript language syntax. What you need to know, is that a group of radio buttons with no selection will report 'Off' as its value. If the field should be visible when the Group of radio buttons is not set to 'Off '. In this case, we set the event.target.display property (you can find out what it means in the Acrobat JavaScript API documentation: Acrobat SDK Documentation DC: event.target ) display.visible or in the other case display.hidden (once again, it details in the documentation of the API).
-
Script need help for a price structure-difficult
I have 2 fields in a pdf, an amount for the cost of subscription and according to the quantity entered, you will get the appropriate price appear. Should be simple, but my pricing structure is not simple, and I have no idea how to make this work
Points to note
Quantity field of could be formulated as any number, but,.
Prices are based on groups of 100, regardless of the actual amount, so if you have 2 or 99, you still get charged for a full 100
Price structure
Any quantity between 1-300 would be £36 / 100
Any quantity of 301 to 700 would be £27 for 100
Any amount of 701-1500 would be £18 for 100
Any quantity on 1501 would be £9 per 100
So if I had a total of 899, it could be distributed as follows
up to 300 @ £36 per 100 = £108 (3 x 36)
301 - 700 @ £27 per 100 = £108 (4 x 27)
701 - 1500 @ £18 to £100 = 36 (2 x 18)
Total subscription = £252
If it was a basic, buy it, the cheapest unit price gets I would be nice, but because its tiered pricing, I am completely lost and have no idea where to start (Please keep in mind, I'm a newbie to all this!)
Thanks in advance
I hope that I understood... I tested it with your example, and it produces the correct answer, so I think I did.
In any case, use this code than the calculation script custom from the total price field:
var quantity = Number(this.getField("quantity").value); var totalPrice = 0; if (quantity>=1501) { totalPrice += Math.ceil((quantity-1500)/100) * 9; quantity = 1500; } if (quantity<=1500 && quantity>=701) { totalPrice += Math.ceil((quantity-700)/100) * 18; quantity = 700; } if (quantity<=700 && quantity>=301) { totalPrice += Math.ceil((quantity-300)/100) * 27; quantity = 300; } if (quantity<=300) { totalPrice += Math.ceil(quantity/100) * 36; } event.value = totalPrice;
-
The HTML output to the existing script maps help
I found a script that had a lot of things that I needed. I have since deleted stuff we didn't need and added some other stuff that we need. The result is good, but now I want to turn this into a page in HTML and it gets an error. Any help would be greatly appreciated. I'm pretty good with PowerShell to be somewhat dangerous with things.
$Cluster = 'CLUS-1' $ClusterName = Get-Cluster $Cluster $Datastores = $ClusterName | Get-Datastore | Where {$_.Name -notlike '*LOCAL' -and $_.Name -notlike 'VM_Datastore*' -and $_.Name -notlike 'Templates' -and $_.Name -notlike 'ISO' -and $_.Name -notlike '*SCRATCH*' -and $_.Name -notlike 'Archive'} $Clusters = Get-View -ViewType ComputeResource | Where {$_.Name -like $ClusterName.Name} $Clusters | % { $Cluste = $_ $VMHostsView = $null $VMHostsView = Get-View $Cluste.Host -Property Name, Hardware, Config $VMss = $ClusterName | Get-VM $HostCount = ($VMHostsView | Measure-Object).Count $VMCount = 0 + ($VMss | Measure-Object).Count $VMsPerHost = [Math]::Round(($VMCount/$HostCount), 1) $vCPU = 0 + ($VMss | Measure-Object -Sum -Property NumCPU).Sum $allocatedram = 0 + ($VMss | Measure-Object -Sum -Property MemoryGB).Sum $avgrampervm = [Math]::Round(($allocatedram/$VMCount), 1) $pCPUSocket = ($VMHostsView | % { $_.Hardware.CPUInfo.NumCpuPackages } | Measure-Object -Sum).Sum $TpCPUSocket += $pCPUSocket $pCPUCore = ($VMHostsView | % { $_.Hardware.CPUInfo.NumCpuCores } | Measure-Object -Sum).Sum $vCPUPerpCPUCore = [Math]::Round(($vCPU/$pCPUCore), 1) $TotalClusterRAMGB = [Math]::Round((Get-Cluster $Cluster | Get-VMHost | % { $_ } | Measure-Object -Property MemoryTotalGB -Sum).Sum) $TotalClusterRAMusageGB = [Math]::Round((Get-Cluster $Cluster | Get-VMHost | % { $_ } | Measure-Object -Property MemoryUsageGB -Sum).Sum) $TotalClusterRAMUsagePercent = [Math]::Round(($TotalClusterRAMusageGB/$TotalClusterRAMGB)*100) $TotalClusterRAMFreeGB = [Math]::Round(($TotalClusterRAMGB-$TotalClusterRAMUsageGB)) $TotalClusterRAMReservedGB = [Math]::Round(($TotalClusterRAMGB/100)*15) $TotalClusterRAMAvailable = [Math]::Round(($TotalClusterRAMFreeGB-$TotalClusterRAMReservedGB)) $newvmcountram = [Math]::Round(($TotalClusterRAMAvailable/$avgrampervm)) $DSCount = 0 + ($datastores | Measure-Object).Count $TotalDSCapacityGB = 0 + [Math]::Round((($datastores | Measure-Object -Sum -Property CapacityGB).Sum), 0) $TotalDSFreeGB = 0 + [Math]::Round((($datastores | Measure-Object -Sum -Property FreespaceGB).Sum), 0) $TotalDSUsedGB = [Math]::Round(($TotalDSCapacityGB - $TotalDSFreeGB),0) $allocatedstorage = 0 + ($VMss | Measure-Object -Sum -Property ProvisionedSpaceGB).Sum $avgstoragepervm = [Math]::Round(($allocatedstorage/$VMCount), 1) $newvmcountstorage = [Math]::Round(($TotalDSFreeGB/$avgstoragepervm)) New-Object PSObject | Add-Member -Pass NoteProperty "Cluster Name" $ClusterName.Name | Add-Member -Pass NoteProperty "Cluster - Host Count" $HostCount | Add-Member -Pass NoteProperty "Cluster - VM Count" $VMCount | Add-Member -Pass NoteProperty "Cluster - VM per Host" $VMsPerHost | Add-Member -Pass NoteProperty "Compute - Number of pCPU" $TpCPUSocket | Add-Member -Pass NoteProperty "Compute - pCPU per Core" $pCPUCore | Add-Member -Pass NoteProperty "Compute - Number of vCPU" $VCPU | Add-Member -Pass NoteProperty "Compute - vCPU per pCore" $vcpuperpcpucore | Add-Member -Pass NoteProperty "Compute - Total Memory (GB)" $TotalClusterRAMGB | Add-Member -Pass NoteProperty "Compute - Total Memory Used (%)" $TotalClusterRAMUsagePercent | Add-Member -Pass NoteProperty "Compute - Total Memory Used (GB)" $TotalClusterRAMusageGB | Add-Member -Pass NoteProperty "Compute - Total Memory Free (GB)" $TotalClusterRAMfreeGB | Add-Member -Pass NoteProperty "Compute - Total Memory Allocated (GB)" $TotalClusterRAMReservedGB | Add-Member -Pass NoteProperty "Compute - RAM Available for NEW VMs (GB)" $TotalClusterRAMAvailable | Add-Member -Pass NoteProperty "Compute - Average RAM allocated per VM" $avgrampervm | Add-Member -Pass NoteProperty "Compute - Remaining VMs based on available RAM" $newvmcountram | Add-Member -Pass NoteProperty "Storage - Datastore Count" $DSCount | Add-Member -Pass NoteProperty "Storage - Total Datastore Capacity (GB)" $TotalDSCapacityGB | Add-Member -Pass NoteProperty "Storage - Total Datastore Free (GB)" $TotalDSFreeGB | Add-Member -Pass NoteProperty "Storage - Total Datastore Used (GB)" $TotalDSUsedGB | Add-Member -Pass NoteProperty "Storage - Average storage allocated per VM" $avgstoragepervm | Add-Member -Pass NoteProperty "Compute - Remaining VMs based on available storage" $newvmcountstorage }
{on the last line of the script after} add below line
| ConvertTo-Html | Out-file c:\log.html
-
Guest OS script customization help.
Hello
I am trying to run a script in a virtual machine after deploying a paralytic. The script sets the automatic logon to activate because we need this function to perform certain other actions before joining the domain.
I activated the VM Guest OS customization VAPP ("customization of activate ', 'Change SID', 'Password Reset'") and I used William Lams script provided here, http://blogs.vmware.com/vsphere/2012/06/using-a-guest-customization-script-to-tell-when-vappvm-is-ready-in-vcloud-director.html in the section of script Guest OS customization as a base.I have tried both:
off @echo
If '%1% ' == 'precustomization' (echo of the tasks precustomization) otherwise if '%1% ' == 'postcustomization' (c:\script\script.bat)
and
off @echo
If '%1% ' is "precustomization" (echo of precustomization task) if '%1% ' is 'postcustomization' (cmd/c reg add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon" AutoAdminLogon t REG_SZ/d '1' f v)
cmd /c reg add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon" DefaultUserName t REG_SZ/d 'Administrator' f v
cmd/d reg add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon" v DefaultDomainName t REG_SZ/d 'localhost' f
Shutdown r)The first example points to a file, c:\script\script.bat, locally on the virtual machine. If I use Williams script without changing the vm-is-ready file is created.
The customscript.bat is created in a folder under C:\Windows\Temp\ on of Windows virtual machine with the content as described above, but it seems that it is never executed
Any help appreciated.
Thank youWe that debogues in offline mode, so just to sum up the results so far:
Theory:
There are several things here.
One is on unattend.xml required by sysprep. The way in which it is used is the following:-VCD uses the ' basic' version of guestcustomization/windows/unattend.xml-obtained set cached in guestcustomization/windows_deployment_package_sidgen.cab on the first request to customize Vista + or any other virtual Windows computer in case "change SID is false."d ' after the above, I believe that it is possible to use the unattend.xml file "basic" to "extend" VCD offer out-of-the-box. Remember that any time that you do this, you must manually backup or remove guestcustomization/windows_deployment_package_sidgen.cab. Then the system takes care of regenerate automatically using the most recent version of the unattend.xml file-I think that this is not the right way to go in this particular case. This approach would severely limit flexibility due to the need to specify a password for automatic logon. So, you would have to live with a hard-coded pass which is very precarious. But it works very well for 'static' things like "company name".-I think change unattend.xml inside the virtual machine (probably see you \Windows\Panther) is not going to work somehow. I don't know exactly the purpose of this file, but I think that it is generated by sysprep itself during its work-I work on improvements for the next version and followed bug add this feature. Basically I dynamically update unattend.xml based on the password set in VCDThe other is about performance after customization. The way it works now (for the case of "change SID is true") is that we rely on the Windows Task Scheduler. Basically plan us customization after execution of the script to run after reboot to the very last point inside the sysprep mini-setup phase. If the warning you see is probably the Scheduler and I think it's harmless. It also means that after customization will be the last thing that is performed on your virtual machine. So not sysprep after that and I don't expect anything to delete your registry values or either reboot.Now, I suspect that these keys are not simply added because of a problem with the keys themselves or (as you well pointed out) this could be the permissions problem.Practice:We went with the first approach, which is a good enough compromise for this particular client:0) be careful with the update of file system of the cell while signed in as 'root' ssh, because most of the files (if not all) is the property of vcloud:vcloud(1) to add:XXX true XXX true localhost true 8 Administrator at $VCD_HOME/guestcustomization/windows/unattend.xml(2) to remove the $VCD_HOME/guestcustomization/windows_deployment_package_sidgen.cab that caches the unattend.xml file. System must regenerate. If she doesn't do something like:Su - vcloudCD/opt/vmware/vcloud-director/deploymentPackageCreatorexport LD_LIBRARY_PATH = / opt/vmware/vcloud-Director/deploymentPackageCreator
. / deploymentPackageCreator... / guestcustomization/windows... /guestcustomization/windows_deployment_package_sidgen.cab "Customize - guest.exe" 1(3) be aware that on some models sysprep automatically disables the administrator account. It was not a problem on the model of the customer, but for me it does not on any of my models in the laboratory. The solution is to create another account to the Administrators group, and to be used for automatic logon. I'm working on the fix.(4) for debugging this kind of things always start to do it manually on an own virtual computer (run sysprep.exe to register commands from the command line, run update) and check to succeed before trying to mess with VCD
(5) we have no debug update registry problem, I'll put it on my TODO list
Andrii
-
I need help, try to understand why the cmdlet new - vm is an error. Any help would be appreciated.
code snip (excuse the crappy line wraps)
$VIServer = "vCenterServer" Connect-VIServer $VIServer
$VMCSV_Builds = import-Csv-chemin.\VM_Config.csv
$i = 0
$VMCSV_Builds | % {
card # my variables
$Clust = get-data center | Get-Cluster ($_.) Cluster)
$templatevm = $_.templatevm
$datastore = $_.datastore
$vmhost = $Clust | Get-VMhost | get-random
$custspec = $_.custspec
$vmname = $_.vmname
$NUMCPU = $_. NUMCPU
$MemoryMB = $_. MemoryMB
$ipaddr = $_.ipaddress
$subnet = $_.subnet
$gateway = $_.gateway
$pdns = $_.pdns
$sdns = $_.sdns
#$vlan = $_.vlan
$description = $_.notes#debugging
Write-Host $Clust
Write-Host $vmhost. Name
$Step = '1 '.
If {($Step-eq «1»)}
#Step 1
# To connect VM
If (!) (Get - VM $vmname - ErrorAction) 0))
{
# B configure the IP address
Get-OSCustomizationSpec
$custspec | Get-OSCustomizationNicMapping |
Game-OSCustomizationNicMapping - IpMode UseStaticIp - IpAddress SubnetMask - $subnet - $gateway - Dns $pdns passerelle_par_defaut, $sdns $ipaddr
# C copy the model and apply the customizations
"$item = New - VM - VMhost $vmhost - name $vmname - model $templatevm - NumCpu $NUMCPU - MemoryMB $MemoryMB - Datastore $datastore'DiskStorageFormat - slim - $description - OSCustomizationSpec $custspec - RunAsync Description ' ' n step 1 is now running. ' n »
Get task? | {
{$_.id - eq $Item.id}
Start-Sleep - 30 seconds
}
on the other
{
««nVM aleady exists, check for task execution...»» ' ' n '.
$Task = @(get-tâche |?) {$_. Description - eq "Clone virtual machine"})If ($Task)
{
#$Task
Write-Host "task is $($Task [$i].). PercentComplete) % complete. »
$i ++
}
on the other
{
"Task is complete, proceed to the next step (2) ' n '.
}
}
}
}end Snip
This is the error I get:
New-VM: all parameters can be resolved by using the specified named parameters.
D:\Users\hal0210\desktop\Scripts\CreateVM.ps1:45 tank: 27
+ $item = new virtual machine < < < < - VMhost $vmhost - name $vmname - model $templatevm - NumCpu $NUMCPU - MemoryMB $MemoryMB - data $datastore store - say
thin kStorageFormat - $description - OSCustomizationSpec $custspec - RunAsync Description' ' n step 1 is now running. ' n »
+ CategoryInfo: InvalidArgument: (:)) [new-VM], ParameterBindingException)
+ FullyQualifiedErrorId: AmbiguousParameterSet, VMware.VimAutomation.ViCore.Cmdlets.Commands.NewVMHello, halibut-
Ah, Yes, there is another problem: the parameters you use for New - VM. Since you are using the - model parameter, which excludes using some of the other New - VM settings, because the set of model parameters.
The valid parameters for use with New - VM deployment of the model are:
* AdvancedOptionConfirm* Data storeDescription* DiskStorageFormatDrsAutomationLevelHAIsolationResponseHARestartPriorityLocation* Name* OSCustomizationSpecResourcePoolRunAsyncServer* ModelVAppVMHostWhatIfThus, you must remove the parameters - NumCpu and - MemoryMB (and values) of the appeal of New - VM. Then, after the call for New - VM is closed, you can use the Set-VM cmdlet to set newly created NumCpu and MemoryMB of the virtual machine.
Who give a shot. And, you can get more info on ParameterSets by running: Get-Help-full about_Functions_Advanced_Parameters
-
script need help to change the VMinfo Get to include no RDM
Hello world
Could someone help me with the script which retrieves information for VMGuests. I would like to modify this script to include NO RDM, if possible.
Thanks for your help
# The Get-VMInformation function gets information of VM
Function Get-VMInformation {}
{in process
Get - VM | Sort-Object-property name. `
Select-Object Name,@{N="UsedSpaceMB; E = {[math]: tour ($_.)} (UsedSpaceGB * 1 Ko, 0)}}, NumCpu, MemoryMB,.
@{N = "SnapshotSizeMB"; E = {[math]: round (($_ |))} Get-Snapshot | Measure-Object-SizeMB property-sum). Sum, 0)}}
}
{end}
"" | Select-Object @{N = "Name"; {E = {"{0:yyyy - MM - DD} ' f (Get-Date)"}}, UsedSpaceMB, NumCpu, MemoryMB, SnapshotSizeMB
}
}# Get all information from the virtual machine and export it to the output file
Get-VMInformation |
Export-Csv-path $OutPutFile - NoTypeInformation - UseCultureTry this
# The Get-VMInformation function gets all the VM information function Get-VMInformation { process { Get-VM | Sort-Object -Property Name | ` Select-Object Name, @{N="UsedSpaceMB";E={[math]::Round((Get-HardDisk -VM $_ | where {"RawPhysical","RawVirtual" -notcontains $_.Disktype} | Measure-Object -Sum -Property CapacityKB).Sum/1KB)}}, NumCpu,MemoryMB, @{N="SnapshotSizeMB";E={[math]::Round(($_ | Get-Snapshot | Measure-Object -Property SizeMB -Sum).Sum,0)}} } end { "" | Select-Object @{N="Name";E={"{0:yyyy-MM-dd}" -f (Get-Date)}},UsedSpaceMB,NumCpu,MemoryMB,SnapshotSizeMB } } # Get all the VM information and export it to the output file Get-VMInformation | Export-Csv -Path $OutPutFile -NoTypeInformation -UseCulture
-
Strange glitch in my script. Help, please!
I worked on a script that could help a friend to me to prepare pictures for his website. It was working fine until after some small change, it suddenly started telling me this: "cannot open the file because the options are incorrect." The ExtendScript Toolkit highlights the line 44: var doc = app.open (queue);
I looked at all the variants of the app.open (); work, but do not understand what is wrong.
I hope someone will have noticed the problem. Thanks in advance!
#target photoshop var outputWidth = 1500; alert("You will now need to select a folder with photos to be processed."); var inputFolder = Folder.selectDialog("Select Input folder"); // Creating a new subfolder based on user input var outputFolder = new Folder(inputFolder + "/" + "PROCESSED"); outputFolder.create(); var Destination = outputFolder.path + "/" + outputFolder.name; // Replacing %20 with space for clean alert var CleanDestination = Destination.replace('%20', ' '); var CleanerDestination = CleanDestination.replace('%20', ' '); var startRulerUnits = preferences.rulerUnits; app.preferences.rulerUnits = Units.PIXELS; // our web export options var options = new ExportOptionsSaveForWeb(); options.quality = 70; options.format = SaveDocumentType.JPEG; options.optimized = false; options.includeProfile = true; if (inputFolder != null && outputFolder != null) { var files = inputFolder.getFiles(); for (var i = 0; i < files.length; i++) { var file = files[i]; var doc = app.open(file); // get a reference to the current (active) document and store it in a variable named "doc" doc = app.activeDocument; //get the filename without the extension var Name = app.activeDocument.name.replace(/\.[^\.]+$/, ''); if (doc.height > 1000) { //build up the output file name and path var goodFolder = new Folder(outputFolder + "/" + "READY FOR WEB"); goodFolder.create(); var saveFile = File(goodFolder + "/" + Name + "-web" + ".jpg"); // do the resizing. if height > width (portrait-mode) resize based on height. otherwise, resize based on width if (doc.height > doc.width) { doc.resizeImage(null,UnitValue(outputWidth,"px"),null,ResampleMethod.BICUBIC); } else { doc.resizeImage(UnitValue(outputWidth,"px"),null,null,ResampleMethod.BICUBIC); } } else { //build up the output file name and path var smallFolder = new Folder(outputFolder + "/" + "TOO SMALL"); smallFolder.create(); var saveFile = File(smallFolder + "/" + Name + ".jpg"); } doc.convertProfile('sRGB IEC61966-2.1', Intent.RELATIVECOLORIMETRIC, true, true); //you need to have a full filepath not a folder doc.exportDocument(/*outputFolder */saveFile, ExportType.SAVEFORWEB, options); doc.close(SaveOptions.DONOTSAVECHANGES); $.writeln('File ' + (i + 1) + ' of ' + files.length + ' processed'); } //restore ruler units app.preferences.rulerUnits = startRulerUnits; alert(files.length + " files have been processed into " + CleanerDestination); }
This isn't an image, and that's why you can not open in Photoshop. In general, you can trust all the images to be pictures because the user might be confused and there might be system files hidden as only the user knows not of. I would definitely filter files [i] to the supported types and also wrap the app.open in a try-catch block - and check if Photoshop actually managed to open it.
-
Failed to save script files, help!
I was hitting away at my first script for some time now, and I've tracked down the problem. I can't save all files to all locations of the script interface. I wrote a simple test script to see if she would ever save a file:
var savePath = "C:\Users\Public\Documents\ExtendscriptTesting\sploof.txt";
var saveFile = new File(savePath);
saveFile.open("e");
even if this does not work, and she basically plagiarized it verbatim page 118 of the book Adobe Scripting by Chandler McWilliams
- I also tried setting photoshop and extendscript toolkit to run as administrator
- I am logged in as the administrator of the machine
- Windows 7 pro, photoshop cs5
- I can get to read and open files in photoshop, simply not save
Any help? There is another reason that I'm not able to save files from extendscript?
var savePath = "C:\Users\Public\Documents\ExtendscriptTesting\sploof.txt";
This is incorrect, if using the backslash have you use a double bar backslash.
var savePath = "C:\\Users\\Public\\Documents\\ExtendscriptTesting\\sploof.txt";
or you can use a slash...
var savePath = "/ C/Users/Public/Documents/ExtendscriptTesting/sploof.txt";
-
the XML reader - need assistance to change the script, please help
Hi all, I don't know if this is the right place for this question but I want to change a xml flash drive so that it creates the playlist with the name I want and not the default. Some can tell me please how to change this so that when the player has found songs in the "my_mp3s" folder it creates a named xml playlist
'mymusic.xml ' instead of the default "audioplaylist.xml". I tried to edit the script of the player's actions and overwrite changes but it still does not work, here is the code please help. I found this script online.
Thank you
Stop();
/ * ALL BUTTONS BELOW ARE MARKED FOR EDITABLE AND DON'T CHANGE, BUT IF YOU KNOW WHAT YOU ARE DOING
THEN YOU CAN ACTUALLY CHANGE WHAT YOU WANT BUT FOR THIS APP WORKS CORRECTLY ONLY CHANGE IF NECESSARY
ENTRIES... ONCE YOU HAVE MADE YOUR CHANGES, COPY AND PASTE THIS ENTIRE SCRIPT PAGE IN
THE FIRST IMAGE OF THE SCENARIO THAT HE RIGHT THE SCRIPT THATS ALREADY THERE.
The button labels for the XML READER text * /.
SIDE MENU BUTTONS\\\
Btn1.buttText.ButtonText.text = "DOWNLOAD FILES"; DO NOT CHANGE
btn2.buttText.ButtonText.text = "SYSTEM VOLUME"; DO NOT CHANGE
btn3.buttText.ButtonText.text = 'EDIT PLAYLIST XML'; DO NOT CHANGE
btn4.buttText.ButtonText.text = "BURN CD"; DO NOT CHANGE
btn5.buttText.ButtonText.text = "CREATE a FOLDER"; DO NOT CHANGE
btn6.buttText.ButtonText.text = 'DELETE FILE'; DO NOT CHANGE
btn7.buttText.ButtonText.text = "CDROM OPEN"; DO NOT CHANGE
btn8.buttText.ButtonText.text = 'OPEN DVD'; DO NOT CHANGE
btn9.buttText.ButtonText.text = "FTP CLIENT"; DO NOT CHANGE
btn14.buttText.ButtonText.text = "VIEW PLAYLIST"; DO NOT CHANGE
btn23.buttText.ButtonText.text = "INFO"; DO NOT CHANGE
btn25.buttText.ButtonText.text = 'HELP '; DO NOT EDIT
btn26.buttText.ButtonText.text = 'HELP MDM'; DO NOT CHANGE
LOW BTNS
btn19.buttText.ButtonText.text = "OPEN TRAY"; DO NOT CHANGE
btn20.buttText.ButtonText.text = 'CLOSE CD TRAY'; DO NOT CHANGE
btn21.buttText.ButtonText.text = "OPEN DVD TRAY"; DO NOT CHANGE
btn22.buttText.ButtonText.text = "CLOSE DVD TRAY"; DO NOT CHANGEHere ARE the FUNCTIONS THAT CAN BE CHANGED, BUT THAT THOSE BRAND 'YOU CAN CHANGE this PATH' are sure to change
MY DOWNLOAD FILES
Btn1.onRelease = function() {}
MDM. Dialogs.BrowseFile.filterList = "MP3 files | * .mp3 ';
MDM System.exec ("E:\\My Music\\"). Path to the download of the file //YOU CAN CHANGE THIS path
}
SYSTEM VOLUME / / / DO NOT CHANGE
btn2.onRelease = function() {}
MDM. System.exec("sndvol32.exe"); System volume .exe
}
EDITING XML PLAYLIST / / / DO NOT CHANGE
btn3.onRelease = function() {}
MDM. System.exec (MDM. System.Paths.programFiles+"Mgamerz\\audiolist2.xml"); XML list
}
BURN CD / / YOU CAN CHANGE THIS PATH
btn4.onRelease = function() {add your way here to your burning nero for example software
MDM. System.exec (MDM. System.Paths.programFiles+"Nero\\nero.exe");
}
CREATE FOLDER / / / DO NOT CHANGE
btn5.onRelease = function() {}
MDM FileSystem.makeFolderUnicode ("C:\\Program Files\\Mgamerz\\Burn"). Creates a working folder for burning mp3s
}
DELETE FOLDER / / / DO NOT CHANGE
btn6.onRelease = function() {///Deletes working folder if you want to remove it
MDM. FileSystem.deleteFolder ("C:\\Program Files\\Mgamerz\\Burn", "ask", "Are you sure");
}
OPEN CDROM / / YOU CAN CHANGE THIS PATH
btn7.onRelease = function() {///Opens change of cdrom drive letter to match your pc
MDM System.exec("I:\\."); "
}
OPEN DVDROM / / YOU CAN CHANGE THIS PATH
btn8.onRelease = function() {///Opens changing the letter to match your pc dvdrom drives
MDM System.exec("I:\\."); "
}
FTP CLIENT / / YOU CAN CHANGE THIS PATH
btn9.onRelease = function() {///File path to your ftp software (I use here the cover page)}
MDM. System.exec (MDM. System.Paths.programFiles + "Microsoft FrontPage Bar\\Office\\Microsoft Office\\Office10\\Shortcut"); "
}
Buttons in the header at the topDRIVE C: / / / DO NOT EDIT
btn10.onRelease = function() {///Opens to the top of drive c: for navigation
MDM. System.exec (MDM. System.Paths.programFiles+"\\");
}
* btn11.onRelease = function() {///Opens to the top of the unit for navigation
MDM System.exec("D:\\."); " YOU CAN CHANGE THIS PATH
}*/
MY DOCUMENTS / / / NOT EDIT
btn12.onRelease = function() {///Opens my documents for navigation}
MDM. Dialogs.BrowseFile.filterList = "MP3 files | * .mp3 ';
MDM. Dialogs.BrowseFile.show ("my Documents\\");
}
MP3 FILE / / / DO NOT CHANGE THE
btn13.onRelease = function() {//main directory for mp3 files
MDM. System.exec (MDM. System.Paths.programFiles+"Mgamerz\\my_mp3s\\");
}
VIEW PLAYLIST / / / DO NOT CHANGE
btn14.onRelease = function() {///View playlist as a text file
MDM. System.exec (MDM. System.Paths.programFiles+"Mgamerz\\my_mp3s\\mp3.t xt");
}
UPDATE XML FILE / / / DO NOT CHANGE
btn15.onRelease = function() {///Creates xml playlist once new mp3s have been added
MDM. System.exec (MDM. System.Paths.programFiles+"Mgamerz\\audiolist2.xml");
}
MINIMIZE BUTTON
* btn16.onRelease = function() {//Minimizes application
MDM. Application.Minimize (///DO) NOT EDIT
}*/
CLOSE BUTTON
* btn17.onRelease = function() {///Closes application
MDM. Application.Exit ('ask', ' are you sure you want to go out to? ") DO NOT EDIT
}*/
SCREEN CAPTURE DEVICE / / / DO NOT CHANGE
btn18.onRelease = function() {///Screen capture sofdtware
MDM. System.exec (MDM. System.Paths.programFiles+"Mgamerz\\apps\\Capture screen Studio\\css.exe");
}
OPEN CDROM TRAY / / YOU CAN CHANGE THIS PATH
btn19.onRelease = function() {}
MDM System.openCDTray ("I").
}
CDROM TRAY CLOSE / / YOU CAN CHANGE THIS PATH
btn20.onRelease = function() {//Closes cdrom tray
MDM System.closeCDTray ("I").
}
OPEN DVDROM PLATEAU / / YOU CAN CHANGE THIS PATH
btn21.onRelease = function() {//Opens dvdrom
MDM System.openCDTray ("H").
}
CLOSE TRAY DVDROM / / YOU CAN CHANGE THIS PATH
btn22.onRelease = function() {//Closes dvdrom plateau
MDM System.closeCDTray ("H").
}* btn23.onRelease = function() {//DO NOT EDIT
nextFrame();
}*/
HELP / / DO NOT EDIT
btn25.onRelease = function() {//Closes dvdrom plateau
MDM. System.exec (MDM. System.Paths.programFiles+"Mgamerz\\help.exe");
}
HELP OF MDM / / DO NOT EDIT
btn26.onRelease = function() {//Closes dvdrom plateau
MDM. System.exec (MDM. System.Paths.programFiles + "MDM helps 2.5 file\\MDM 2.5 UserManual.chm"); "
}use:
/ * ALL BUTTONS BELOW ARE MARKED FOR EDITABLE AND DON'T CHANGE, BUT IF YOU KNOW WHAT YOU ARE DOING
THEN YOU CAN ACTUALLY CHANGE WHAT YOU WANT BUT FOR THIS APP WORKS CORRECTLY ONLY CHANGE IF NECESSARY
ENTRIES... ONCE YOU HAVE MADE YOUR CHANGES, COPY AND PASTE THIS ENTIRE SCRIPT PAGE IN
THE FIRST IMAGE OF THE SCENARIO THAT HE RIGHT THE SCRIPT THATS ALREADY THERE.
The button labels for the XML READER text * /.
SIDE MENU BUTTONS\\\
Btn1.buttText.ButtonText.text = "DOWNLOAD FILES"; DO NOT CHANGE
btn2.buttText.ButtonText.text = "SYSTEM VOLUME"; DO NOT CHANGE
btn3.buttText.ButtonText.text = 'EDIT PLAYLIST XML'; DO NOT CHANGE
btn4.buttText.ButtonText.text = "BURN CD"; DO NOT CHANGE
btn5.buttText.ButtonText.text = "CREATE a FOLDER"; DO NOT CHANGE
btn6.buttText.ButtonText.text = 'DELETE FILE'; DO NOT CHANGE
btn7.buttText.ButtonText.text = "CDROM OPEN"; DO NOT CHANGE
btn8.buttText.ButtonText.text = 'OPEN DVD'; DO NOT CHANGE
btn9.buttText.ButtonText.text = "FTP CLIENT"; DO NOT CHANGE
btn14.buttText.ButtonText.text = "VIEW PLAYLIST"; DO NOT CHANGE
btn23.buttText.ButtonText.text = "INFO"; DO NOT CHANGE
btn25.buttText.ButtonText.text = 'HELP '; DO NOT EDIT
btn26.buttText.ButtonText.text = 'HELP MDM'; DO NOT CHANGE
LOW BTNS
btn19.buttText.ButtonText.text = "OPEN TRAY"; DO NOT CHANGE
btn20.buttText.ButtonText.text = 'CLOSE CD TRAY'; DO NOT CHANGE
btn21.buttText.ButtonText.text = "OPEN DVD TRAY"; DO NOT CHANGE
btn22.buttText.ButtonText.text = "CLOSE DVD TRAY"; DO NOT CHANGEHere ARE the FUNCTIONS THAT CAN BE CHANGED, BUT THAT THOSE BRAND 'YOU CAN CHANGE this PATH' are sure to change
MY DOWNLOAD FILES
Btn1.onRelease = function() {}
MDM. Dialogs.BrowseFile.filterList = "MP3 files | * .mp3 ';
MDM System.exec ("E:\\My Music\\"). Path to the download of the file //YOU CAN CHANGE THIS path
}
SYSTEM VOLUME / / / DO NOT CHANGE
btn2.onRelease = function() {}
MDM. System.exec("sndvol32.exe"); System volume .exe
}
EDITING XML PLAYLIST / / / DO NOT CHANGE
btn3.onRelease = function() {}
MDM. System.exec (MDM. System.Paths.programFiles+"Mgamerz\\audiolist2.xml"); XML list
}
BURN CD / / YOU CAN CHANGE THIS PATH
btn4.onRelease = function() {add your way here to your burning nero for example software
MDM. System.exec (MDM. System.Paths.programFiles+"Nero\\nero.exe");
}
CREATE FOLDER / / / DO NOT CHANGE
btn5.onRelease = function() {}
MDM FileSystem.makeFolderUnicode ("C:\\Program Files\\Mgamerz\\Burn"). Creates a working folder for burning mp3s
}
DELETE FOLDER / / / DO NOT CHANGE
btn6.onRelease = function() {///Deletes working folder if you want to remove it
MDM. FileSystem.deleteFolder ("C:\\Program Files\\Mgamerz\\Burn", "ask", "Are you sure");
}
OPEN CDROM / / YOU CAN CHANGE THIS PATH
btn7.onRelease = function() {///Opens change of cdrom drive letter to match your pc
MDM System.exec("I:\\."); "
}
OPEN DVDROM / / YOU CAN CHANGE THIS PATH
btn8.onRelease = function() {///Opens changing the letter to match your pc dvdrom drives
MDM System.exec("I:\\."); "
}
FTP CLIENT / / YOU CAN CHANGE THIS PATH
btn9.onRelease = function() {///File path to your ftp software (I use here the cover page)}
MDM. System.exec (MDM. System.Paths.programFiles + "Microsoft FrontPage Bar\\Office\\Microsoft Office\\Office10\\Shortcut"); "
}
Buttons in the header at the topDRIVE C: / / / DO NOT EDIT
btn10.onRelease = function() {///Opens to the top of drive c: for navigation
MDM. System.exec (MDM. System.Paths.programFiles+"\\");
}
* btn11.onRelease = function() {///Opens to the top of the unit for navigation
MDM System.exec("D:\\."); " YOU CAN CHANGE THIS PATH
}*/
MY DOCUMENTS / / / NOT EDIT
btn12.onRelease = function() {///Opens my documents for navigation}
MDM. Dialogs.BrowseFile.filterList = "MP3 files | * .mp3 ';
MDM. Dialogs.BrowseFile.show ("my Documents\\");
}
MP3 FILE / / / DO NOT CHANGE THE
btn13.onRelease = function() {//main directory for mp3 files
MDM. System.exec (MDM. System.Paths.programFiles+"Mgamerz\\my_mp3s\\");
}
VIEW PLAYLIST / / / DO NOT CHANGE
btn14.onRelease = function() {///View playlist as a text file
MDM. System.exec (MDM. System.Paths.programFiles+"Mgamerz\\my_mp3s\\mp3.t xt");
}
UPDATE XML FILE / / / DO NOT CHANGE
btn15.onRelease = function() {///Creates xml playlist once new mp3s have been added
MDM. System.exec (MDM. System.Paths.programFiles+"Mgamerz\\mymusic.xml");
}
MINIMIZE BUTTON
* btn16.onRelease = function() {//Minimizes application
MDM. Application.Minimize (///DO) NOT EDIT
}*/
CLOSE BUTTON
* btn17.onRelease = function() {///Closes application
MDM. Application.Exit ('ask', ' are you sure you want to go out to? ") DO NOT EDIT
}*/
SCREEN CAPTURE DEVICE / / / DO NOT CHANGE
btn18.onRelease = function() {///Screen capture sofdtware
MDM. System.exec (MDM. System.Paths.programFiles+"Mgamerz\\apps\\Capture screen Studio\\css.exe");
}
OPEN CDROM TRAY / / YOU CAN CHANGE THIS PATH
btn19.onRelease = function() {}
MDM System.openCDTray ("I").
}
CDROM TRAY CLOSE / / YOU CAN CHANGE THIS PATH
btn20.onRelease = function() {//Closes cdrom tray
MDM System.closeCDTray ("I").
}
OPEN DVDROM PLATEAU / / YOU CAN CHANGE THIS PATH
btn21.onRelease = function() {//Opens dvdrom
MDM System.openCDTray ("H").
}
CLOSE TRAY DVDROM / / YOU CAN CHANGE THIS PATH
btn22.onRelease = function() {//Closes dvdrom plateau
MDM System.closeCDTray ("H").
}* btn23.onRelease = function() {//DO NOT EDIT
nextFrame();
}*/
HELP / / DO NOT EDIT
btn25.onRelease = function() {//Closes dvdrom plateau
MDM. System.exec (MDM. System.Paths.programFiles+"Mgamerz\\help.exe");
}
HELP OF MDM / / DO NOT EDIT
btn26.onRelease = function() {//Closes dvdrom plateau
MDM. System.exec (MDM. System.Paths.programFiles + "MDM helps 2.5 file\\MDM 2.5 UserManual.chm"); "
} -
Script quick help/change necessary.
I've searched the forums, but can't seem to find what I need. I found the original script here and modified slightly to fit what I need as well as a detail. I have this as a Batch process that I have to apply this to several documents. Right now, he recorded with the date and time, the batch is executed, and then updates the date when it is printed. I wish I had the date of update when the document is opened as well. If you are able to help me with this, that would be greatly appreciated. Thanks for taking a peek!
for (variety p = 0; p < this.numPages; p ++)
{
var fd = this.addField ("Date", "text", p, [72,66,540,50]);
fd.textSize = 8;
FD. Value = "this is a control Document. Printed copies are valid for the last 24 hours: "+ util.printd (" dddd dd mmmm yyyy hh: mm tt', new Date() ");"
FD.allignment = 'right ';
fd.fillColor = color.transparent;
fd.textColor = color.red;
fd.borderColor = color.red;
FD. ReadOnly = true;"var txtWillPrint = ' var d = this.dirty; \r".
+ ' var fd = this.getField ("Date"); \r'
+ "fd.value ="this is a control Document. Printed copies are valid for the last 24 hours: "+"
+ ' util.printd ("dddd mmmm dd yyyy hh: mm tt", new Date()); \r'
+ 'this.dirty = d;';this.setAction ("WillPrint", txtWillPrint);
}
For the last two lines of your script, use:
this.setAction ("WillPrint", txtWillPrint); You already have it
this.addScript ("init", txtWillPrint); This adds a script to the document level
The addScript method is documented here: http://livedocs.adobe.com/acrobat_sdk/9.1/Acrobat9_1_HTMLHelp/JS_API_AcroJS.88.440.html
This new script to the document level runs whenever the document is opened and will update the date field that you add the current date and time.
Maybe you are looking for
-
Links of some (but not all) of an external application fail.
Some external application links fail to open in Firefox (but open fine when IE is the default browser instead). This problem occurred in the 3-point-something version thing, I was running previously, as well as in the 6.0 I run now. If Firefox does n
-
Windows Vista Skype 7.0 crashes
I've updated Skype whenu sign it says Skype stop work cuz of preventions of Excution of Date have no idea what this means that someone could help me worked fine before the update could someone tell me how to solve this problem or solve this problem t
-
Download Adobe Flash Player 11.4r402
Adobe Flash Player 11.4r402 stoped working.
-
stand-by power mode re - begins shortly after entering the power saving mode
My other machine stand-by mode and then the power automatically back up after about 30-40 seconds
-
I would change my motherboard (HP Pavilion Elite m9190.nl), because I suspect that the current is broken. Time for an upgrade. Any Micro ATX would fit the case? For example the Asrock H67M-GE with a Boxed Intel Core i5 2500 Boxed processor