I need a script edited so it will enter the intiger a specified number.

This is a number generating script created by Michel Lemieux and posted here: http://www.quark.com/service/forums/viewtopic.php?t=4176 I need this script to ask for data that would specify the number of times each number should be added to the file. IE: the return data in the created file would look like this if 2 was entered: 1<\b>1<\b>2<\b>2<\b>3<\b>3<\b>4<\b>4<\b>

Hello
It is often easier to write a code anew than to edit an existing one...
Try somethnig like this. This will handle both integer and non-integer numbers for series along with your requirement on iteration count of each number.
Cheers.
H
-- SCRIPT
main()
on main()
set mss1 to "Enter i, j, k, r, separated by space, where -
    i = start number
    j = end number
    k = increment  (k ≠ 0 AND (i - j) * k <= 0)
    r = repetition count  (r >= 1)"
set mss2 to "Where to save the result?"
set errs1 to "Parameter error."
repeat
set t to text returned of (display dialog mss1 default answer "1 100 1 1")
try
set tt to {}
repeat with t in text2list(t, space)
set t to t's contents
if t is not "" then
set end of tt to t as number
end if
end repeat
set {i, j, k, r} to tt
set r to r as integer
if (r < 1) or (k = 0) or ((i - j) * k > 0) then
display dialog errs1 with icon 2
error number 8000
end if
exit repeat
on error number errn
if errn = -128 then error number -128 -- user cancel
end try
end repeat
--return {i, j, k, r}
set nn to {}
repeat until (i - j) * k > 0
repeat r times
set end of nn to i
end repeat
set i to i + k
end repeat
set t to list2text(nn, "<\\b>")
--return t
set f to choose file name with prompt mss2 default name "*.xtg"
writeData("" & f, t, {_append:false})
return {nn, t}
end main
on list2text(aa, delim)
  list aa : source list
  text delim : text item delimiter in list-text conversion
local t, astid, astid0
set astid to a reference to AppleScript's text item delimiters
try
set astid0 to astid's contents
set astid's contents to {delim}
set t to "" & aa
set astid's contents to astid0
on error errs number errn
set astid's contents to astid0
error "list2text(): " & errs number errn
end try
return t
end list2text
on text2list(t, delim)
  text t : source text
  text delim : text item delimiter in text-list conversion
local tt, astid, astid0
set astid to a reference to AppleScript's text item delimiters
try
set astid0 to astid's contents
set astid's contents to {delim}
set tt to t's text items
set astid's contents to astid0
on error errs number errn
set astid's contents to astid0
error "text2list(): " & errs number errn
end try
return tt
end text2list
on writeData(fp, x, {append:append})
  text fp: output file path
  data x: anything to be written to output file
  boolean _append: true to append data, false to replace data
local a
try
open for access (file fp) with write permission
set a to fp as alias
if not _append then set eof a to 0
write x to a starting at eof
close access a
on error errs number errn
try
close access file fp
on error --
end try
error "writeData(): " & errs number errn
end try
end writeData
-- END OF SCRIPT
  Mac OS 9.1.x  

Similar Messages

  • Need to create a user who will run the logminer what rights should be given

    I Need to create a user who will run the logminer what specific rights should be given in order to run the logminer and query the logminer views. Cant give the sysdba privilages.
    Any help in this regard will be really appericiated.
    Thanks

    I have given the following privilages
    GRANT CREATE SESSION TO NEW_USER;
    GRANT SELECT ANY TABLE TO NEW_USER;
    GRANT EXECUTE ON DBMS_LOGMNR TO NEW_USER;
    GRANT EXECUTE ON SYS.DBMS_LOGMNR_D TO NEW_USER;
    GRANT SELECT ON V_$SESSION TO NEW_USER;
    GRANT SELECT ON V_$ARCHIVED_LOG TO NEW_USER;
    GRANT SELECT ON V_$LOG TO NEW_USER;
    GRANT SELECT ON V_$LOGFILE TO NEW_USER;
    GRANT SELECT ON V_$LOGMNR_CONTENTS TO NEW_USER;
    but when i try to add the logfile it gives me the following error
    ERROR at line 1:
    ORA-06550: line 1, column 85:
    PLS-00201: identifier 'DBMS_LOGMNR.NEW' must be declared
    ORA-06550: line 1, column 7:
    PL/SQL: Statement ignored
    What additional rights can i gave to run this
    Thanks

  • What is the URL that Adobe Acrobat needs to contact for Activation after you enter the serial number

    What is the URL that Adobe Acrobat needs to contact for Activation after you enter the serial number? We need to allow internet access to our users for it.

    there are quite a few but they all are on the adobe.com domain.

  • Need a parked/blocked report that contains both the FI and MM number for ea

    Hi Guys,
    Business need a report which contains the translation of 'MM' numbers (typically beginning with '51') assigned for parked PO invoices vs. the 'FI' document number that comes out in the parked report. 
    Ideally, business need a parked/blocked report that contains both the FI and MM number for each record.
    Can someone help me pull this report from MM
    Thanks and Regards,
    Habeeb

    Hello Habeeb,
    Check out the report MR43 which gives information about Parked invoice. Also you can have a look on MIR6 with check box Parked Innvoice.
    The main table for parking invoice is VBKPF and other relevent tables are as follow:
    VBKPF                          Document Header for Document Parking
    VBSEC                          Document Parking One-Time Data Document Segment
    VBSEGA                         Document Segment for Assets Document Parking
    VBSEGD                         Document Segment for Customer Document Parking
    VBSEGK                         Document Segment for Vendor Document Parking
    VBSEGS                         Document Segment for G/L Accounts Document Parking
    VBSET                          Document Segment for Taxes Document Parking
    Hope this helps.
    Regards
    Arif Mansuri

  • If i previously downloaded cds i owned through itunes but i need to deactivate all then reactivate will all the music still show up?

    had too many computers authorized because of computer dying and need to know how the music both downloaded by itunes and by cd will stay on computer?

    If you deactivate your computer all your media will stay put. If you tried to sync a device without activating your computer again any protected media would be removed from the device.
    You should backup anyway.
    tt2

  • I am a Media Pastor at a church and am needing to find a Macbook that will fulfill the needs of running Final Cut Pro and Wirestream. What Macbook would be sufficient to do the job?

    I am needing some guidance on the purchase of a Macbook Pro. I am wanting to have Wirestream Pro 4, a live streaming/recording software, and Final Cut Pro 7 and am needing to see what i would need to run them as far as drive capacity etc.

    The top end MacBook Pro 15" (17" high res/anti-glare for full 1080 HD screen)  for mobile video needs with some restrictions and hinderances, you will need the Build to Order 7,200 RPM drive for sure as you need space and speed.
    You can have 8GB of RAM from Apple or place 16GB in yourself for a lot less than Apple charges for 8GB. However you need to be handy with tiny screws, or have a local specialist do the 16GB for you.
    Your probally better off with a MacPro than a MacBook Pro.
    The MacPro is more powerful, and easier to get inside and do things, lasts longer, more ports, more drives, more storage for video, fast external RAID 5 setups etc.
    So if you can get into a MacPro, that would be a better option for video.

  • I need a script to help me check all the AD Computers for a certain file.

    What I'm looking for is a script that I can use to check all the AD computers in my domain for a file that was created by Malware. It would be great if the script could export the results as a csv and have a column for the computer name, IP address, and
    if the file/path exists.
    I'm new to Powershell and I've been trying to script it on my own but no luck so far. I would be extremely great-full for any help, or a point in the right direction.
    I messed around with different commands:
    I'm not sure if I should be using test-path or get-childitem with recursive and wildcards.
    This is a sample of what I'm working with... I know it probably horrible but like I said I'm new.
    $date = [DateTime]::Today.AddDays(-90)
    $AllComps = get-adcomputer -filter {(Enabled -eq 'true') -and (lastlogondate -gt $date)} | select name
    $Allcomps = $AllComps[100..125]
    foreach ($ADcomputer in $AllComps)
    function check-remotefile {
        PROCESS {
                    $file = "\\$_\C$\Windows\notepad.exe"
                    if (test-path $file)
                    echo "$ADcomputer: .exe exists"

    You fail to ask a question.  What is it you do not know or understand?
    Start simple and learn how to best post code:
    $date=[DateTime]::Today.AddDays(-90)
    Get-adcomputer -filter 'Enabled -eq $true -and lastlogondate -gt $date' |
    Where{test-path "\\$($_.Name)\C$\Windows\notepad.exe"} |
    ForEach-Object{echo "$($_.Name): .exe exists"}
    Learn the basics. The pipeline is you friend.
    ¯\_(ツ)_/¯

  • HT3583 I just purchased a Canon Rebel T2i camera and need to know if Aperature 3 will support the Raw files from this camera

    Will Aperture 3 support Canon Rebel T2i Raw picture format?  I just got the camera and am disappointed that their software does not yet work with the Lion operating system.  They said driver would be available in the first quarter of 2012 but when I checked it still is not on the list.  I will upgrade to Aperature 3 from Aperature 2 if it supports the Canon T2i Raw files.  Any input is appreciated.
    Thanks.

    http://www.apple.com/aperture/specs/raw.html

  • HT1386 My hard drive died and I need to resync my iPad.  Will just following the initial instructions resync my iPad and restore all my information or do I need to try to recover the iPad file from the dead hard drive?

    My hard drive died and I need to resync my Ipad.  Will following the initial instructions for syncing work or do I need to restore my original files from the dead hard drive.

    If the hard drive that crashed is the one that stored the itunes library, be sure to restore the library from Time Machine (mac) or whatever backup you use on windows.  That will get back your music.  I suspect that the replacement drive has an empty itunes library and thus, perhaps, the itunes match used that to sync to its servers.
    Try posting in the iTunes Match forum, you'll probably find more knowledgeable folks there.
    https://discussions.apple.com/community/itunes/itunes_match

  • How we will pull the data from Sap-Bi to sap-Bpc

    Dear Experts,
    Thanks for watching this thread.The whole data is available in SAP-BI.
    My system environment is SAP-BPC MS7.5.
    Now i want to load the data from Sap-Bi to Sap-Bpc ms.For that we need any Interfaces.
    How we will pull the data from SAP-BI to BPC-MS for Master data and Transaction Data.
    could  you please provide me step by step guide.
    Please guide me what should i do.
    Regards,
    Srinivasan.
    Edited by: srinivasan.singari on Jul 22, 2011 8:20 AM

    Tough Ask..
    Because i have done dashboarding thru scritping (Dyanamic fashion tough) ..It is very good ..But when, coming to the one you asked i have the idea how it works but cannot really tell you wich would be better.
    Each Route has its own limitations.That really depends on what exaclty your client is looking after..
    So if you new to xcelsius and eager to learn ..I suggest you to give a go at all those..May be you can let me know wich is the best one..
    1. QAWS,
    2. Bex Query --> Crystal Reports --> Live office --> DashBoard.
    3. Bex Query --> WebI --> Live Office --> Dashboard..
    4. Webservices consuming BI Query,
    5. Xcelsius SAP Netwever Connector.
    But i suggest as of now use Xcelsius SAP netweaver Connnection...

  • Can't iconvert SD600 files on mac book pro, apparently not compatiable.  What software can i download that will transcode the files so i can log

    I have the SD files on my mac book pro hardrive but they are not compatiable and i cannot view them. I want to edit the clips in FInal Cut Pro.  I think i need to downloadd some software which will transcode the files and then i can import into Final Cut Pro? Any suggestions greatly appreciated!

    Acorrding to the technical specs, it shoots mpeg4/h.264... However, I see other places mention it is MTS...
    Do you still have the original file structure intact? Or do you have just individual movie files? whats the extension? .MTS, .MPEG4, MOV?
    If MTS and you no longer have the original file sturcute intact, you need to use Clipwrap, if you do have the original files structure, you may be able to import using Log and Transfer....

  • I have the G Drive 1 TB (GEN4 1TB) external drive purchased in 2010. I need to connect to my new MacBook Pro. I'm using the external drive for media storage of my video editing projects. Will a 800fw to thunderbolt adapter cable work?

    I have the G Drive 1 TB (GEN4 1TB) external drive purchased in 2010. I need to connect to my new MacBook Pro. I'm using the external drive for media storage of my video editing projects. Will a 800fw to thunderbolt adapter cable work? I understand that using a USB port connection is not fast enough for video editing. I read somewhere the G Drives don't connect well to MacBook Pro.
    thanks
    larry

    I doubt this can be relocated or moved so you might want to just repost in the macbook pro area.
      MacBook Pro
    https://discussions.apple.com/community/notebooks/macbook_pro
    https://discussions.apple.com/community/mac_os?view=discussions
    Can you afford a new Thunderbolt case and cable? any case with FW800 is going to be slow 72MB/sec and less, and any new 1TB drive is capable of 75MB/s minimum up to 125MB/sec.
    Thunderbolt storage can of course when setup properly reach 100's of MB higher using multiple drives.
    Use what you have for a system backup or for secondary backup storage.
    you might be able to take the drive - most cases allow you to open and swap drives - and use this:
    G-Technology 1TB G-DRIVE mini High-Speed Portable Hard Drive                                   
    or this:
    http://store.apple.com/us/product/HB137VC/A/g-technology-4tb-g-raid-professional -high-performance-dual-drive-hard-drive?fnode=5f

  • Creating pdf forms from a Word doc that will need to be edited in the future

    Ok, I searched everywhere for an answer to this situation... and I want to know if there is a work around.
    Basically, I have a word document. I will use this Word document to create a application form. So I will manually create fields where needed after I convert the document to pdf.
    Now here is the issue... at some point, the Word document will have to be changed... maybe a date or an address or something. This would mean I would have to change the original Word document, re-create the form (adding all the fields again) and re-publish it.
    Can I somehow edit the text in the pdf (with the fields already in place) without having to change the original word file and re-create the form?
    Has anyone had this problem? Am I doing something wrong? Or is there an assumption that the original Word document you use to create your form (pdf) will not be changed at a later date?
    Thanks.
    Quinn

    Ok, sorry if I haven't quite figured this out.
    When I create a pdf form, AA can detect some fields and automatically creates them. This is great. For other fields, I have to create them. No problem.
    So here I have Document A (MS Word) and my new pdf form (Document B).
    I edit Document A and change the date in the header let's say. I re-create my pdf form (Document C).
    How will Document C remember to re-associate the fields I created in Document B? Won't I have to start all over again?
    This is my question. If the answer is no, then I just have to hope that when I create the new form, AA can figure out as many fields as possible (and selection choices such as bullet, check marks, etc).
    Thanks again for your help.
    Quinn

  • I need a script that will find the computer a user last logged into.

    I am still learning scripting, I need a script that will allow me to pull in usernames from a csv file. Find what computer they last logged into and output that to an csv file.
    I have looked all over and can't find exactly what I need.
     I found the following script but I need  to add the resuitsize unlimited but can not figure out where to put it we have a large environment. Also I need to be able to grab username from a csv file. Any assistance you can provide is appreciated.
    ##  Find out what computers a user is logged into on your domain by running the script
    ##  and entering in the requested logon id for the user.
    ##  This script requires the free Quest ActiveRoles Management Shell for Active Directory
    ##  snapin  http://www.quest.com/powershell/activeroles-server.aspx
    Add-PSSnapin Quest.ActiveRoles.ADManagement -ErrorAction SilentlyContinue
    $ErrorActionPreference = "SilentlyContinue"
    # Retrieve Username to search for, error checks to make sure the username
    # is not blank and that it exists in Active Directory
    Function Get-Username {
    $Global:Username = Read-Host "Enter username you want to search for"
    if ($Username -eq $null){
    Write-Host "Username cannot be blank, please re-enter username!!!!!"
    Get-Username}
    $UserCheck = Get-QADUser -SamAccountName $Username
    if ($UserCheck -eq $null){
    Write-Host "Invalid username, please verify this is the logon id for the account"
    Get-Username}
    get-username resultsize unlimited
    $computers = Get-QADComputer | where {$_.accountisdisabled -eq $false}
    foreach ($comp in $computers)
    $Computer = $comp.Name
    $ping = new-object System.Net.NetworkInformation.Ping
      $Reply = $null
      $Reply = $ping.send($Computer)
      if($Reply.status -like 'Success'){
    #Get explorer.exe processes
    $proc = gwmi win32_process -computer $Computer -Filter "Name = 'explorer.exe'"
    #Search collection of processes for username
    ForEach ($p in $proc) {
    $temp = ($p.GetOwner()).User
    if ($temp -eq $Username){
    write-host "$Username is logged on $Computer"

    If you are querying by user "resultset size" will be of no use.
    You also have functions that are never used and the body code doe snot look for users.
    Here is what you scrip looks like if printed well.  It is just a jumble of pasted together and unrelated items.
    ## Find out what computers a user is logged into on your domain by running the script
    ## and entering in the requested logon id for the user.
    ## This script requires the free Quest ActiveRoles Management Shell for Active Directory
    ## snapin http://www.quest.com/powershell/activeroles-server.aspx
    Add-PSSnapin Quest.ActiveRoles.ADManagement -ErrorAction SilentlyContinue
    $ErrorActionPreference = "SilentlyContinue"
    # Retrieve Username to search for, error checks to make sure the username
    # is not blank and that it exists in Active Directory
    Function Get-Username {
    $Global:Username = Read-Host "Enter username you want to search for"
    if ($Username -eq $null) {
    Write-Host "Username cannot be blank, please re-enter username!!!!!"
    Get-Username
    $UserCheck = Get-QADUser -SamAccountName $Username
    if ($UserCheck -eq $null) {
    Write-Host "Invalid username, please verify this is the logon id for the account"
    Get-Username
    get-username resultsize unlimited
    $computers = Get-QADComputer | where { $_.accountisdisabled -eq $false }
    foreach ($comp in $computers) {
    $Computer = $comp.Name
    $ping = new-object System.Net.NetworkInformation.Ping
    $Reply = $null
    $Reply = $ping.send($Computer)
    if ($Reply.status -like 'Success') {
    #Get explorer.exe processes
    $proc = gwmi win32_process -computer $Computer -Filter "Name = 'explorer.exe'"
    #Search collection of processes for username
    ForEach ($p in $proc) {
    $temp = ($p.GetOwner()).User
    if ($temp -eq $Username) {
    write-host "$Username is logged on $Computer"
    I suggest finding the original code then use the learning link at the top of this page to help you understand how it works in Powershell.
    ¯\_(ツ)_/¯

  • I need to know that Adobe Premier elements 12 will do the following; allow for zooming in of recordings (i,e, can zoom in on items I edit); Can display orgiinal and zoomed recordings side by side; and allow for frame-by-frame playback

    I need to know that Adobe Premier elements 12 will do the following; Allow for zooming in of recordings (i,e, can zoom in on items I edit); Can display orgiinal and zoomed recordings side by side; and allow for frame-by-frame playback.
    Is this possible?
    Any input is appreciated! Thank you.

    Tom
    Thanks for the reply.
    Your thoughts on frame by frame viewing are can do. However, the real time playback feature includes the concept of rendering the Timeline, when the program indicates the need to do so,  to get the best possible preview of what you are seeing in the Edit area monitor. That is a major novel in itself. Each time you do a new edit you will get the render indicator message to ignore or act on.
    Definitely go the free 30 day tryout route for Premiere Elements 12. I have Premiere Elements 12 (updated to 12.1) and it runs fine on Windows 8.1 64 bit.
    Best start with the Premiere Elements 12 Help PDF.
    http://helpx.adobe.com/pdf/premiere-elements_reference.pdf
    Also please review by blog posts Premiere Elements 12 First Look and Premiere Elements 12 Daily Discovery.
    http://www.atr935.blogspot.com/2013/09/premiere-elements-12-first-look-details.html
    ATR Premiere Elements Troubleshooting: Premiere Elements 12 Daily Discoveries
    When you get to the point of hand on with a mini test run project, I can offer to work with you through some specific workflow details in post exchanges in your thread(s). And we can sort out the can and cannot do.
    ATR

Maybe you are looking for