Sponsored Content
Top Forums Shell Programming and Scripting perl + array and incrementing number Post 12940 by Optimus_P on Wednesday 9th of January 2002 12:51:42 PM
Old 01-09-2002
i think that will work.

in the end on the webpage there should be a number next to the movie so i dont have to manualy count how manyy i have.
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

perl, put one array into many array when field is equal to sth

Hi Everyone, #!/usr/bin/perl use strict; use warnings; my @test=("a;b;qqq;c;d","a;b;ggg;c;d","a;b;qqq;c;d"); would like to split the @test array into two array: @test1=(("a;b;qqq;c;d","a;b;qqq;c;d"); and @test2=("a;b;ggg;c;d"); means search for 3rd filed. Thanks find the... (0 Replies)
Discussion started by: jimmy_y
0 Replies

2. Shell Programming and Scripting

Array in Perl - Detect several file to be in one array

Hi everyone I have one question about using array in perl. let say I have several log file in one folder.. example test1.log test2.log test3.log and the list goes on.. how to make an array for this file? It suppose to detect log file in the current directory and all the log file will... (3 Replies)
Discussion started by: sayachop
3 Replies

3. Shell Programming and Scripting

PERL : Read an array and write to another array with intial string pattern checks

I have an array and two variables as below, I need to check if $datevar is present in $filename. If so, i need to replace $filename with the values in the array. I need the output inside an ARRAY How can this be done. Any help will be appreciated. Thanks in advance. (2 Replies)
Discussion started by: irudayaraj
2 Replies

4. Shell Programming and Scripting

Incrementing number in bash

I have the following code and getting the error ./raytrac.bash: line 231: ((: 0++: syntax error: operand expected (error token is "+") iarg = 0 iarg=0 narg=$# # Number of arguments passed. echo "narg = $narg" argsArr=("$@") # Set... (1 Reply)
Discussion started by: kristinu
1 Replies

5. Shell Programming and Scripting

Number of arguments to array - Perl Script

I have the following proc. proc get_add {arg1 arg2 arg3 arg4 arg 5 .. ... arg N } { } i need to count the number of arguments and also i need those arguments stored in an array. please help out ---------- Post updated at 06:33 PM ---------- Previous update was at 05:30 PM ---------- ... (1 Reply)
Discussion started by: Syed Imran
1 Replies

6. UNIX for Dummies Questions & Answers

Incrementing the New File Version Number

Hello All, In the below script i am trying to check and list the file names, get the last file with highest version number and then increment the version number when i create another file. Example: file1 is COBANK_v1.xml and file2 i want to put it as COBANK_v2.xml, to achieve this i am using awk... (15 Replies)
Discussion started by: Ariean
15 Replies

7. Shell Programming and Scripting

Replacing string by incrementing number

Dear all Say I have a file as ! TICKET NBR : 234 !GSI : 102 ! 3100.2.112.1 11/06/2013 15:56:29 ! 3100.2.22.3 98 ! 3100.2.134.2 8 ! ! TICKET NBR : 1809 ! GSI : 102 ! 3100.2.112.1 11/06/2013 16:00:45 ! 3100.2.22.3 65 ! 3100.2.134.2 3 ! ! TICKET NBR : 587 ! GSI : 102 ! 3100.2.112.1... (3 Replies)
Discussion started by: OTNA
3 Replies

8. Shell Programming and Scripting

Incrementing parts of ten digits number by parts

I have number in file which contains date and serial number: 2013101000. The last two digits are serial number (00). So maximum of serial number is 100. After reaching 100 it becomes 00 with incrementing 10 which is day with max 31. after reaching 31 it becomes 00 and increments 10... (31 Replies)
Discussion started by: Natalie
31 Replies

9. UNIX for Beginners Questions & Answers

Incrementing the New File Version Number

Hi, This is my first post here. I am using cygwin on Windows 7. I am starting with a data file with filename "name_1.ext", like "20180831_snapgenotypes_1.csv". The "_1" before ".ext" is a version number. Integers (0-99) are sufficient. They don't have to be like "1.0.0". The filename may... (2 Replies)
Discussion started by: minimalist
2 Replies

10. UNIX for Beginners Questions & Answers

UNIX replacing and incrementing number

Hi I am unix newbie looking for a unix bash script that can make it easier to do my code work. we have a code number for each code block that we want to incrementally assign. We have 10000 of these and it is very laborious to do this one by one. so what we want is start from the top of the... (4 Replies)
Discussion started by: chamajid
4 Replies
SWFACTION(3)								 1							      SWFACTION(3)

The SWFAction class

INTRODUCTION
SWFAction. CLASS SYNOPSIS
SWFAction SWFAction Methods o SWFAction::__construct (string $script) DESCRIPTION
The script syntax is based on the C language, but with a lot taken out- the SWF bytecode machine is just too simpleminded to do a lot of things we might like. For instance, we can't implement function calls without a tremendous amount of hackery because the jump bytecode has a hardcoded offset value. No pushing your calling address to the stack and returning- every function would have to know exactly where to return to. So what's left? The compiler recognises the following tokens: o break o for o continue o if o else o do o while There is no typed data; all values in the SWF action machine are stored as strings. The following functions can be used in expressions: o time() - Returns the number of milliseconds (?) elapsed since the movie started. o random(seed) - Returns a pseudo-random number in the range 0-seed. o length(expr) - Returns the length of the given expression. o int(number) - Returns the given number rounded down to the nearest integer. o concat(expr, expr) - Returns the concatenation of the given expressions. o ord(expr) - Returns the ASCII code for the given character o chr(num) - Returns the character for the given ASCII code o substr(string, location, length) - Returns the substring of length $length at location $location of the given string $string. Additionally, the following commands may be used: o duplicateClip(clip, name, depth) - Duplicate the named movie $clip (aka sprite). The new movie clip has name $name and is at depth $depth. o removeClip(expr) - Removes the named movie clip. o trace(expr) - Write the given expression to the trace log. Doubtful that the browser plugin does anything with this. o startDrag(target, lock, [left, top, right, bottom]) - Start dragging the movie clip $target. The $lock argument indicates whether to lock the mouse (?)- use 0 ( FALSE) or 1 ( TRUE). Optional parameters define a bounding area for the dragging. o stopDrag() - Stop dragging my heart around. And this movie clip, too. o callFrame(expr) - Call the named frame as a function. o getURL(url, target, [method]) - Load the given URL into the named target. The $target argument corresponds to HTML document targets (such as "_top" or "_blank"). The optional $method argument can be POST or GET if you want to submit variables back to the server. o loadMovie(url, target) - Load the given URL into the named target. The $target argument can be a frame name (I think), or one of the magical values "_level0" (replaces current movie) or "_level1" (loads new movie on top of current movie). o nextFrame() - Go to the next frame. o prevFrame() - Go to the last (or, rather, previous) frame. o play() - Start playing the movie. o stop() - Stop playing the movie. o toggleQuality() - Toggle between high and low quality. o stopSounds() - Stop playing all sounds. o gotoFrame(num) - Go to frame number $num. Frame numbers start at 0. o gotoFrame(name) - Go to the frame named $name. Which does a lot of good, since I haven't added frame labels yet. o setTarget(expr) - Sets the context for action. Or so they say- I really have no idea what this does. And there's one weird extra thing. The expression frameLoaded(num) can be used in if statements and while loops to check if the given frame number has been loaded yet. Well, it's supposed to, anyway, but I've never tested it and I seriously doubt it actually works. You can just use /:framesLoaded instead. Movie clips (all together now- aka sprites) have properties. You can read all of them (or can you?), you can set some of them, and here they are: o x o y o xScale o yScale o currentFrame - (read-only) o totalFrames - (read-only) o alpha - transparency level o visible - 1=on, 0=off (?) o width - (read-only) o height - (read-only) o rotation o target - (read-only) (???) o framesLoaded - (read-only) o name o dropTarget - (read-only) (???) o url - (read-only) (???) o highQuality - 1=high, 0=low (?) o focusRect - (???) o soundBufTime - (???) So, setting a sprite's x position is as simple as /box.x = 100;. Why the slash in front of the box, though? That's how flash keeps track of the sprites in the movie, just like a Unix filesystem- here it shows that box is at the top level. If the sprite named box had another sprite named biff inside of it, you'd set its x position with /box/biff.x = 100;. At least, I think so; correct me if I'm wrong here. PHP Documentation Group SWFACTION(3)
All times are GMT -4. The time now is 02:14 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy