Script CCX 8.5 find variable in file
Hi
I’m looking for sample script, where I can find string from variable in file which is stored CCX 8.5 [en_EN]. Script is for authenticate users via entered 3 digits and this digits will be compared with “UserID.txt”.
ID users are stored in file “UserID.txt” and each UserID can be separate comma “,” (123,324,001,098,312) or each UserID is in new line
123
324
001
098
312
Below sample scenario
1) Users enter 3 digits (Get Digit String) to UserID (String) exaple 123
2) Script compare entered digits (123) with contents of file “UserID.txt”.
3) If entered digits (123) will find in “UserID.txt” then TRUE else FALSE.
Thanks!
Hi,
use the haystack.contains(needle) method. Like this:
G.
Similar Messages
-
How to find variables in an fla file?
Hello all,
I purchased a flash web template that is very complex, and
have been learning flash more earnestly from it. I only know how to
find actionscripts by clicking on frames in symbols with an "a" One
such frame makes refences to _root.READ = 1 (another 2, 3, etc).
Unfortunately I cannot find what "READ" is. Can someone help me
with how is "best" to find variable declarations in a complex fla
file with no familiarity with its creation?
The specific coade I am looking at references a pop-up
window:
on (release) {
_root.popup_pressed = 1;
_root.scrHEIGHT = 555;
_root.scroller.scroller.gotoAndStop(2);
_root.TM_title = "Advertising and Marketing";
_root.READ = 1;
_root.scroller.gotoAndPlay("s1");
All the best!
MichaelThank you. I am also not savvy with flash (yet), and after I
posted this I noticed an unexpanded list in the action pane which
shows variables (left bottom corner). This alone was a big help. I
also discovered the "Movie Explorer" and typing "READ" into that
only gives me "Scene1" (the top level clip).
I wanted to ask a follow-up question to your posting. I
thought that only frames marked with "a" had actionscript code in
them, but from your reply it seems that variables can be declared
in ANY frame? So, to find the variable "READ" I need to click on
each frame to find it?
Best regards,
Michael -
Apple script to find all duplicate files
Is it possible to write an applescript to find all duplicate file names on my hard drive? My hd is almost full, and if I can delete duplicate files, it'll save me from having to buy another external drive.
Thanks,
GeorgeWhy would you have found 20GB of duplicate images? iPhoto has built-in duplicate detection, it can remove any duplicates or prevent them from being imported altogether. Did you disable this in iPhoto for some reason? Or were you still using folders and subfolders to store your photos?
Just because two pictures have the exact same filename does NOT mean they are identical. If this application you used simply compared their filenames, it's possible you actually lost all those photos and not just some duplicates. ;( Because many cameras reuse filenames after a certain point! -
Find and copy files by file name
Hey Gang,
I sure hope you guys can help me out. I'm looking for a piece of software that can read a txt file or spreadsheet to find specific files and copy them from one place to another.
In other words, I have a folder with 1000 files in numerical order from 1 to 1000. I need software that can copy only selected images (ie 4, 53, 244, 456, 999, etc...) to a separate folder.
Any Ideas?
-ChrisThis is very simple to do with a script.
Let's assume that the files are in /Users/cnhoward/source and you want to move particular files to /Users/cnhoward/dest. Let's say you have a text file, numbers.txt, with one number on each line, and the files are named like 'file_X.txt' where 'X' is the number. Then you could do this in terminal:
for n in `cat numbers.txt`
do
cp /Users/cnhoward/source/file_${n}.txt /Users/cnhoward/dest
done
You don't give much in the way of details, but that should give you an idea to start from. -
Cannot find config.js file in user folder
Dear All,
I could not find config.js in user java script folder.
I used app.getPath("user", "javascript"); function to find the user folder and it contains glob.js and glob.settings.js file.
Where should i find Config.js file to execute priviledged methods in a non-privilaged context.
Thanks for all.
Mohamed IdrisThanks a lot, That has worked. I was thinking that config.js will come with default setup loaded with setup information.
-
I would like to create a workflow in Automator or a script in AppleScript (or a combination of the two), that opens Safari to a specified page and downloads an excel file from this page and saves the downloaded document to my desktop.
Is this something that be done? If so, how?
I have so far been able to build a workflow in Automator to open Safari and added an AppleScript that takes Safari to a specific page that has an Excel document.
I can't figure out where to go from here... Any help would be apprecitated.
Thanks!Would you have the web address the excel sheet is on?
Is there a simular web page you could point to if not?
Would there be a copy of the file on an FTP page. This would be easier.
curl
http://www.cyberciti.biz/faq/mac-os-x-terminal-download-file/
http://www.thegeekstuff.com/2012/04/curl-examples/
http://curl.haxx.se/docs/manpage.html
Macintosh-HD -> Applications -> Utilities -> Terminal
# Press return to run a command.
the curl is a terminal command ( Unix ). It allows you to read a file off of the web.
man curl
provides cryptic information on the commnad curl.
press the space bar to advance a page.
press letter to q to quit.
What you may have to is to read in the web page as a text file. Go "fishing" through the page to find the excel file you need. Once you find the file, you can use curl to read the file.
curl is a very full featured command. (read complex to figure out ).
It is easier to diagnose problems with debug information. I suggest adding log statements to your script to see what is going on. Here is an example.
Author: rccharles
For testing, run in the Script Editor.
1) Click on the Event Log tab to see the output from the log statement
2) Click on Run
For running shell commands see:
http://developer.apple.com/mac/library/technotes/tn2002/tn2065.html
on run
-- Write a message into the event log.
log " --- Starting on " & ((current date) as string) & " --- "
-- debug lines
set desktopPath to (path to desktop) as string
log "desktopPath = " & desktopPath
set unixDesktopPath to POSIX path of desktopPath
log "unixDesktopPath = " & unixDesktopPath
set quotedUnixDesktopPath to quoted form of unixDesktopPath
log "quoted form is " & quotedUnixDesktopPath
try
set fromUnix to do shell script "ls -l " & quotedUnixDesktopPath
display dialog "ls -l of " & quotedUnixDesktopPath & return & fromUnix
on error errMsg
log "ls -l error..." & errMsg
end try
end run -
I am in the process of building a new website in iWeb '09 for the first time since upgrading to Lion but can't find the domain file I'm working on so as to make a backup. I have run the script that makes the Library folder visible, since Lion hides this folder, but the Application Support folder in Library doesn't contain a folder for iWeb. I have searched and searched for domains and .site files with no luck. Fortunately, I can open the new site in iWeb and update and publish, but I have no idea where it is finding the domain file that it is opening. As you can imagine, I'm very uneasy about not being able to back up the site as I invest more work into it.
I have two other iWeb sites that were created prior to the Lion upgrade. Each is in a separate account on my iMac. I had moved the domain files for these sites out of the Library/Application Support/iWeb folders to more easily accessible folders prior to the Lion upgrade, so they are fine.
It's the new site that is causing me concern.
Interestingly, when I move one of the old domains to a new account on my iMac as a test, when I double click on it, iWeb launches but wants me to create a new website rather than opening the site associated with the old domain file.
Any suggestions will be appreciated.Use the freeware app Find File to track down the Domain - or Domain.sites2 - file...
http://www.macupdate.com/app/mac/30073/find-file
See this page for info about opening Domain files using Lion and Mountain Lion...
http://www.macupdate.com/app/mac/30073/find-file
Also note that you don't have to run a script to show the user Library. Just open the Finder Go menu while holding down the option key.
On the same page you will find a link to the freeware Mountain Tweaks which will hide/show the library plus a lot of other exciting tweaks. -
How to find the corrupted files using javascript?
Hi all,
I need to run batch of files some of which were corrupted?? instead of using the method "the files which were not opened are corrupted" is there any way to find the corrupted files??
I need to find this using javascript or apple script??
Please some one help me..
Regards,
subhaWe found one datafile has corrupted by using dbv.dbv would have reported the block ids (block numbers) that are corrupted.
query dba_extents to identify the segments that contain such blocks. -
Hi,
I was given a task to do some housekeeping of users directory
Basically, the structure is of below.
/User DIR
---UserA
---UserB
---UserC
---UserD
---UserE
Each user contain several type of files.
I wan to do a housekeep of the directories to remove *.txt, *.log, *.wk1 that are more than 5 days old.
Pls kindly assist.
i need to search for several type of extension .wk1 , .log , .txt etc. how do i incorporate it in? . Another thing is
ls -l | find . -name "*.txt" -mtime +3 -exec ls {} \; it actually returns me all the subdirectories as well. y is that so?
in my office, i have existing scripts that have similiar syntax
find . ! -type d -ctime -5 -name '*.txt' -exec ls {} \;
find . ! -type d -ctime -5 -name '*.txt' -exec rm -f {} \;
what does find . ! -type d means?
Pls kindly assist.cghcgh wrote:
echo "\n Foldername = ${DIRNAME}"
cd ${DIRNAME}
USERFILE=`ls -1 *.xls *.wk1 *.txt`
for USERFILENAME in ${USERFILE}; do
echo "\n Checking whether file is more than 7 days"
echo " Filename = ${USERFILENAME}"
echo " Removing this file = `find . -mtime +${KEEP} -a -name ${USERFILENAME} -exec ls -l {} \;`"
find . -mtime +${KEEP} -a -name ${USERFILENAME} -exec rm
UGH You are looking for files with an ls, then going back and running two separate finds for every file. But every find will do a full descent/search run of all data in that directory. That's horribly inefficient. The more data under that directory and the more files the 'ls' hands off, the more time and IO it will consume.
Why not just replace that section above with:
echo "\n Foldername = ${DIRNAME}"
find ${DIRNAME} ! -type d \(-name "*.xls" -o -name "*.wk1" -o -name "*.txt" \) -mtime +${KEEP} -exec rm {} +
One find, no 'ls', no problems with spaces.
Add in a '-print' before the '-exec' if you want to print or capture the filenames as you're removing them.
Darren -
Project Server 2010 - Find query size file project in database ProjectServer_Reporting
Hello guys,
Is there any way to find out * .mpp file size (MB, GB, KB) in database ProjectServer2010_Reporting?
If there is a script ready and I thank you can share.
Thank you.
Obrigado por contactar o fórum Microsoft Technet!Hi Zeca Lima,
there is no programmatic way that I know of.... you could save the file as an .mpp file and view the properties though. The size will depend on whether you include enterprise custom fields in your .mpp file.
Ben Howard [MVP] | web |
blog | book |
P2O -
OLT - Why can't it find my databank file after I've uploaded it?
I got this last minute high priority load test dropped in my lap the last second so any help asap would be greatly appriciated! We've started using OpenScript, but not OLT yet so I'm trying to figure this out.
All I'm trying to do is run a simple login script - it works fine and iterates through when I play it in Open script, but I can't get it to find the databank using OLT.
1) I added my script to the scenario
2) Then went to Tools - Upload file - and uploaded the .csv to the right repository - Upload was successful.
3) On the Build Scenarions tab I go to the Configure Data Bank icon - my data base IS there, but when I click on it it says "Cannot find the databank file (repos=...rep name)
Help! any ideas?I'm not sure if this is your problem, but one thing that was added recently is that OpenScript has a setting to store the databanks with a RELATIVE path.
If you open your script, go to Script / Script Properties / Script Assets.
If you then look at each databank, there is a checkbox "Save path relative to current script".
You may have problems if you have a databank locally (whilst developing the script) but needs to be in the same place on the SERVER when actually running them in OLT. If you develop scripts purely on the server itself, this shouldn't be an issue. -
Is there an ap for finding/deleting corrupt files on OS X 10.7?
I seem to have a corrupt file(s) which cause my MacBook Pro to freeze inexplicably (and randomly) upon start-up. I've been told that this is a symptom of having a corrupt file.
Is there an an for finding/deleting corrupt files on OS X 10.7?
I'm pretty much bound to my computer and simply don't have the time to go through it manually.
Thank you.This is an old post and I am not the person who posted the original query, but I ran your terminal diagnostic and am hoping you are still attending to this forum. I have a mid 2011 macbook Air 11", 256 GB SSD, 1.8 GHz Intel Core i7, 4 GB 1333 MHz DDR3, Mac OS X v. 10.7.5 Lion. I have had various problems in my user homefolder for a while. I have gone through quite a few other troubleshooting and fixing steps, the most extensive following a posting here "Step by Step to fix your mac" by ds store in the Apple forums. These steps helped a lot. I did remove some 3rd party software as part of this process.
My computer is running well in general now, but one thing that has been a recurring problem is problems with move/cut-paste. I researched this online and ACL's being present where they're not supposed to be seems to be an issue. I have used terminal commands to remove ACL's, used Onyx to repair user permissions, rebooted with command-r to reset password screen and reset user permissions. They all help, but then a some point later on the problem recurs. When I run repair disk permissions with either disk utility or onyx I always get this message:
Repairing permissions for “maggieairHD”
Warning: SUID file “System/Library/CoreServices/RemoteManagement/ARDAgent.app/Contents/MacOS/ARDAg ent” has been modified and will not be repaired.
ACL found but not expected on “Users”
Repaired “Users”
Permissions repair complete
This ALWAYS comes up, even if I run it immediately after running it and haven't done anything else on the computer in between.
I created another user and did not have the same problems I was having at the time with some programs, although I haven't used it that much to be able to really compare. The home folder permissions repair in Onyx comes out the same in that user, though.
Here are my results from your diagnostic terminal commands:
Last login: Wed Dec 26 09:36:47 on console
Maggies-MacBook-Air:~ maggieair$ kextstat -kl | awk '!/com\.apple/ {print $6 $7}'
com.rim.driver.BlackBerryUSBDriverInt(0.0.68)
com.logmein.driver.LogMeInSoundDriver(1.0.0)
com.protech.NoSleep(1.3.1)
com.parallels.kext.prl_usb_connect(7.0
com.parallels.kext.prl_hypervisor(7.0
com.parallels.kext.prl_hid_hook(7.0
com.parallels.kext.prl_netbridge(7.0
com.parallels.kext.prl_vnic(7.0
Maggies-MacBook-Air:~ maggieair$ sudo launchctl list | sed 1d | awk '!/0x|com\.apple/ {print $3}'
Password:
com.parallels.vm.prl_naptd
org.x.privileged_startx
org.postfix.master
org.ntp.ntpd
org.cups.cupsd
com.vix.cron
com.sharpcast.xfsmond
com.parallels.desktop.launchdaemon
com.microsoft.office.licensing.helper
com.adobe.fpsaud
Maggies-MacBook-Air:~ maggieair$ launchctl list | sed 1d | awk '!/0x|com\.apple/ {print $3}'
org.x.startx
org.openbsd.ssh-agent
com.parallels.vm.prl_pcproxy
com.parallels.DesktopControlAgent
com.parallels.desktop.client.launch
com.maintain.CocktailSystemEvents
Maggies-MacBook-Air:~ maggieair$ ls -1A /e*/mach* {,/}L*/{Ad,Compon,Ex,Fram,In,Keyb,La,Mail/Bu,P*P,Priv,Qu,Scripti,Servi,Sta}* L*/Fonts 2> /dev/null
/Library/Address Book Plug-Ins:
RCFaxAB.bundle
/Library/Components:
/Library/Extensions:
/Library/Frameworks:
AEProfiling.framework
AERegistration.framework
Adobe AIR.framework
AquaticPrime.framework
AudioMixEngine.framework
HPSmartPrint.framework
NyxAudioAnalysis.framework
PluginManager.framework
RIM_VSP.framework
RimBlackBerryUSB.framework
iTunesLibrary.framework
/Library/Input Methods:
/Library/Internet Plug-Ins:
AdobePDFViewer.plugin
AdobePDFViewerNPAPI.plugin
Flash Player.plugin
Quartz Composer.webplugin
QuickTime Plugin.plugin
Silverlight.plugin
flashplayer.xpt
googletalkbrowserplugin.plugin
npgtpo3dautoplugin.plugin
nsIQTScriptablePlugin.xpt
/Library/Keyboard Layouts:
/Library/LaunchAgents:
com.maintain.CocktailPurgeInactiveMemory.plist
com.maintain.CocktailSystemEvents.plist
com.parallels.DesktopControlAgent.plist
com.parallels.desktop.launch.plist
com.parallels.vm.prl_pcproxy.plist
/Library/LaunchDaemons:
com.adobe.fpsaud.plist
com.apple.remotepairtool.plist
com.microsoft.office.licensing.helper.plist
com.parallels.desktop.launchdaemon.plist
com.sharpcast.xfsmond.plist
/Library/PreferencePanes:
Flash Player.prefPane
JavaControlPanel.prefpane
NoSleep.prefPane
/Library/PrivilegedHelperTools:
Google Drive Icon Helper
com.bresink.system.securityagent3
com.microsoft.office.licensing.helper
/Library/QuickLook:
ParallelsQL.qlgenerator
iWork.qlgenerator
/Library/QuickTime:
AppleIntermediateCodec.component
AppleMPEG2Codec.component
/Library/ScriptingAdditions:
MTL.osax
/Library/Services:
AScrEd • New Script for Frontmost Application.workflow
AScrEd • Open Application Scripting Dictionary.workflow
AScrEd • Open Dictionary of Frontmost Application.workflow
AScrEd • Open with AppleScript Editor.workflow
Audio • Encode to iTunes Format.workflow
Browse Movie Library.workflow
Browse Photo Library.workflow
Browse iTunes Library.workflow
Disk Item • Rename Selected Items.workflow
Disk Item • Set Spotlight Comments.workflow
Image • Add Metadata to JPEGs.workflow
Image • Change File Type.workflow
Image • Import into iPhoto.workflow
Image • Print Image Files.workflow
Image • Rotate Clockwise.workflow
Image • Rotate Counter-Clockwise.workflow
Launch Terminal.workflow
PDF • Encrypt File.workflow
PDF • Set Metadata.workflow
Terminal • Get Manual for Command.workflow
Terminal • Insert Current Finder Directory.workflow
Terminal • Insert Selected Finder Items.workflow
UNIX • Apply Command to Selected Items.workflow
UNIX • New Terminal Window to Insertion Location.workflow
iPhoto • Spotlight Search for Detected People.workflow
/Library/StartupItems:
Cocktail
/etc/mach_init.d:
/etc/mach_init_per_login_session.d:
/etc/mach_init_per_user.d:
Library/Address Book Plug-Ins:
.DS_Store
SkypeABDialer.bundle
SkypeABSMS.bundle
Library/Fonts:
Library/Input Methods:
.localized
Library/Internet Plug-Ins:
CitrixOnlineWebDeploymentPlugin.plugin
Google Earth Web Plug-in.plugin
WebEx64.plugin
Library/Keyboard Layouts:
Library/LaunchAgents:
com.apple.AddressBook.ScheduledSync.PHXCardDAVSource.7D3946E8-ADA6-4982-87CA-565 69B042BAC.plist
com.apple.FolderActions.enabled.plist
com.apple.FolderActions.folders.plist
com.google.keystone.agent.plist
com.macpaw.CleanMyMac.volumeWatcher.plist
Library/Mail/Bundles:
Library/PreferencePanes:
.DS_Store
Archives.prefPane
Library/Services:
.DS_Store
GraphicConverter.service
Sync with MacDropAny.workflow
Maggies-MacBook-Air:~ maggieair$ osascript -e 'tell application "System Events" to get the name of every login item'
NoSleep, iTunesHelper, Caffeine, Dropbox
Maggies-MacBook-Air:~ maggieair$
I have removed NoSleep, Caffeine, itunesHelper and Dropbox from login items before and didn't notice any difference, so I put them back. Some of these I know I don't want, like rim/blackberry, adobe AIR. Skype has never worked consistently on this computer. I don't use most of these Services, and I know I had trouble with some that were not compatible with Lion before. I am not using Parallels much now, have been thinking about taking it off as it uses a chunk of my SSD. But I don't feel confident about getting rid of .frameworks etc safely.
I am glad to remove anything I don't use if I know how to do it safely. I am willing to remove anything I do use if it's necessary, but obviously would prefer to find a way to keep things that I find helpful.
I appreciate any suggestions! -
Script or Action to convert the .Indd File into PDF???
Hello All,
I am in need of a Action or Script to convert the InDesign CS4 Files to PDF Format.
I already experiment some action in Illustrator which helps me a lot to reduce my process time.
so i need a same kind of action or script to convert the Batch of InDesign files to PDF...
Can anyone help me in this...Hi Gowdhaman
You may want to download these example scripts:
http://wwwimages.adobe.com/www.adobe.com/products/indesign/scripting/downloads/indesign_cs 4_scripting_guide_scripts.zip
There, you'll find e.g. the ExportPDFWithOptions.jsx script.
Best regards,
- Peder -
I am trying to fix a bunch of file names by adding the appropriate extension based on file type.
I had downloaded a bunch of images from my webserver and noticed the '.jpg' or '.gif' got cut off because the file names were too long.
So, I want to locate all Files of Type 'JPEG', for example, then filter by those whose name or name extension are missing the '.jpg' on the end, and simply add that to the file name.
The problem is Automator can't seem filter these files and perform the desired action on them. Every time, and every which way I've tried, it finds ALL the files, with and without the .jpg at the end.
I have:
Filter files by File Type is JPEG Image File
Name Does not contain '.jpg'
(I've tried Name Extension does not contain 'jpg' too - same result)
Any suggestions?Renaming a file to add an extension is fine, if you know what the file type is to begin with. Since the file was downloaded from a web server, there may not be any Finder info or other metadata to determine what the type is, so you would need to look at the file data and make a guess. There is a built-in shell script that tries to determine a file's type, and some of the more common types (such as text, jpeg, and gif) are checked for. The following Run AppleScript action uses that to try to guess what the file type is and filters accordingly:
<pre style="
font-family: Monaco, 'Courier New', Courier, monospace;
font-size: 10px;
margin: 0px;
padding: 5px;
border: 1px solid #000000;
width: 720px;
color: #000000;
background-color: #FFDDFF;
overflow: auto;"
title="this text can be pasted into an Automator 'Run AppleScript' action">
on run {input, parameters} -- find file types
try to determine file types using the 'file' shell script and filter accordingly
input: a list of Finder items (aliases) to filter
output: a list of Finder items (aliases) filtered
set output to {}
set FileType to (choose from list {"JPEG", "GIF", "PDF", "RTF"} with title "Filetype Filter" with prompt "Select a type to filter:")
if the result is false then error number -128
repeat with AnItem in the input -- step through each item in the input
tell application "Finder"
if (name extension of AnItem) is "" then
do shell script "file -b " & quoted form of POSIX path of (AnItem as text)
if the result contains FileType then set the end of the output to (AnItem as alias)
end if
end tell
end repeat
return the output -- pass the result(s) to the next action
end run
</pre>
Tested workflow:
1) Ask for Finder Items (Type: folders)
2) Get Folder Contents
3) Run AppleScript (the above script) -- choose JPEG or whatever the file type is
4) View Results
5) Rename FInder Items (Add Text - Add: .jpg after name) -- or whatever the extension should be
HTH -
Having downloaded and unzipped tutorial builder, extension builder, and scrip tlistener, I cannot find an application file to load. Please Please help
Hello Jeff
I use Photoshop cc and downloaded Tutorial Builder from Adobe Labs.
Managed to unzip it ok. Now I am stuck as there are .jsx files and script files but no instructions.
Hope you can help and thank you for your interest.
Malcolm
Maybe you are looking for
-
Is there a fix for modal dialogs opening behind palettes -cs6 -osx 10.6.8
Is there a fix for modal dialogs open behind palettes in Photoshop cs6 13.0 (createive cloud update) + OSX 10.6.8 Snow Leopard on MacBook Pro? ( I am using 2 monitors where the second monitor is set to be the menu display. cs4 does not exhibit this
-
TypeError: Error #1009: How do I find the exact line of the error?
I got the following error when testing a project: [SWF] ProjectZ_iOS.swf - 12154544 bytes after decompression TypeError: Error #1009: Cannot access a property or method of a null object reference. at ProjectZ_iOS_fla::MainTimeline/goB
-
Hi, There is a business requirement to have following payment terms. 10% Advance (on Basic Amount), 80% (on Basic Amount) immediately on receipt of bill with 100% of tax amounts and delivery costs, 10% (on Basic Amount) at the end of project How to
-
AppleCare or Customer Relations help requested
I have been a Apple customer for years. Started with a II+ followed by Mac+, MacII, iMacG3, MacMini G4, then another Mini G4, and now a MacBook Pro. Macs have worked well for me, and in return, I have bought several Apple products. Unfortunatley, the
-
Since recent upgrade, can not download from YouTube
Before the most recent upgrade to Firefox 3.6.8 two weeks ago, everything worked fine with this program. My issue is, I can not copy and paste a URL address from You Tube and download it into a program called Audio Editor. After the upgrade, when I c