Skip to search.

Breaking News Visit Yahoo! News for the latest.

×Close this window

ntb-clips · The NoteTab Clips List

The Yahoo! Groups Product Blog

Check it out!

Group Information

? Already a member? Sign in to Yahoo!

Yahoo! Groups Tips

Did you know...
Real people. Real stories. See how Yahoo! Groups impacts members worldwide.

Messages

Advanced
Messages Help
Messages 8271 - 8300 of 23890   Oldest  |  < Older  |  Newer >  |  Newest
Messages: Show Message Summaries Sort by Date ^  
#8271 From: "hpaulissen" <h.paulissen@...>
Date: Wed Mar 6, 2002 9:17 am
Subject: Re: simulating mouse click with ^!keyboard command
hpaulissen
Send Email Send Email
 
--- In ntb-clips@y..., "jaytee556" <Jerry.Treece@a...> wrote:
> Is it possible to simulate a mouse click with the ^!keyboard
> command?  I am writing a clip that will go to a php page, tab to a
> radio button selection.  I then need to click on the selection.
> Enter merely makes a submission without making the selection and I
> haven't found how to do a mouse click.

Jerry,

If you know how to navigate to the different options on this website
using the keyboard, you could consider to use some keyboard TAB,
keyboard UP/DOWN commands before you use keyboard ENTER.

Hugo

#8272 From: Jody <av1611@...>
Date: Tue Mar 5, 2002 10:19 pm
Subject: Re: [Clip] Mysterious clip failure
notetabber
Send Email Send Email
 
Hi Sheri,

It ran as expected for me in v4.86d Pro (pre-release) in XP Pro.

>Could someone test this clip on 4.86d and see if it performs as
>expected?  I wrote this clip and it works fine for me on 4.86c Trial
>Pro and Light, but someone who recently upgraded 4.51 Pro to 4.86d
>says it isn't working for him.  Since he doesn't work much with clips
>I was hoping one of you could establish whether 4.86d has anything to
>do with it.
>
>H=Reverse IngredPrep

#8273 From: "Dick Gascoigne" <dick.gascoigne@...>
Date: Wed Mar 6, 2002 12:06 pm
Subject: Saving checkbox values (was Re: Saving defaults in a valuelist)
bobbit_singa...
Send Email Send Email
 
I figured out how to save checked boxes in a wizard, so that the next time
the wizard is invoked the previously checked boxes will be re-checked.

The method only works if the ListValues are sequential numbers.
(Although if the values start (or end) with the sequential numbers, a SubStr
can be employed to extract them.)

The method involves capturing an array variable from a checkbox wizard,
which has a ListValue of 1|2|3|4|5 ...
The result would be 2|4 if the 2nd and 4th boxes were checked.
That gets saved in an ini file, and retrieved the next time the clip is run.
Then a loop uses THOSE values as indices into the ListValue, so that an
underscore can be inserted before items 2 & 4.
The result would be 1|_2|3|_4|5.
Now, when that ListValue is used in the wizard, the 2nd and 4th boxes are
checked.

Here is the clip that does the checkbox management.
Its purpose is to be a parameter input GUI for another clip that takes a
large file and splits it into multiple files -- one for each box that is
checked. The splitting is done based upon a 'break string' found in the
large file. Then, another process will direct each file to a printer which
is associated with the numbers that were checked -- printers 2 & 4 in the
example above.

If anyone wants the whole file-splitter library, let me know your email.

---- Clip below and paste as a new clip  ---

^!ClearVariables
^!SetListDelimiter |
^!IfFileExist ^$GetLibraryPath$SJ_FileBreaker.ini NEXT ELSE GetParameters
^!SetIniFile SJ_FileBreaker
^!SetArray %WhichPrinters%=^$GetValue("WhichPrinters")$
;
:GetParameters
^!SetArray %PrintersList%=1|2|3|4|5
;   Set defaults from saved WhichPrinters list
^!Set %I%=^%WhichPrinters0%
^!IfFalse ^%I% InputWizard
:Loop
^!If ^%I%=0 InputWizard
^!Set %PrintersList^%WhichPrinters^%I%%%=_^%WhichPrinters^%I%%
^!Dec %I%
^!Goto Loop
;   OK, defaults are set -- now use the array in a checkbox wizard
:InputWizard
^!Set %GetPrinters%=^?{(T=A;H=5)Which printers to use=^%PrintersList%};
%Saveini%=^?{Save the above values to SJ_FileBreaker.ini?==Yes^=1|_No^=}
^!SetArray %WhichPrinters%=^%GetPrinters%
^!Set %NrFiles%=^%WhichPrinters0%
^!IFFalse ^%Saveini% END
^!Skip Saving these values to SJ_FileBreaker.ini file - OK?
^!Goto END
^!SetIniFile SJ_FileBreaker
^!SaveValue WhichPrinters=^%WhichPrinters%

#8274 From: "hansendave" <DAVE@...>
Date: Wed Mar 6, 2002 5:28 pm
Subject: Color coding PHP
hansendave
Send Email Send Email
 
Has anyone written a clip to color code PHP code?

#8275 From: Jody <av1611@...>
Date: Wed Mar 6, 2002 7:47 pm
Subject: Re: [Clip] Color coding PHP
notetabber
Send Email Send Email
 
Hi hansendave,

>Has anyone written a clip to color code PHP code?

It cannot be done.  The registered versions of NoteTab v5 will
have customizable syntax highlighting (and another Fookes
Software editor that is being worked on).  We do not have an
estimated time of release for v5, but it is being worked on.


Happy Clip'n!
Jody

http://www.notetab.net

Subscribe, UnSubscribe, Options
mailto:Ntb-Clips-Subscribe@yahoogroups.com
mailto:Ntb-Clips-UnSubscribe@yahoogroups.com
http://groups.yahoo.com/group/ntb-clips

#8276 From: Jody <av1611@...>
Date: Wed Mar 6, 2002 7:51 pm
Subject: Re: [Clip] Re: simulating mouse click with ^!keyboard command
notetabber
Send Email Send Email
 
Hi Jerry,

I do not know exactly what you are trying but the spacebar should toggle the
radio button on/off.

>> Is it possible to simulate a mouse click with the ^!keyboard
>> command?  I am writing a clip that will go to a php page, tab
>> to a radio button selection.  I then need to click on the
>> selection. Enter merely makes a submission without making the
>> selection and I haven't found how to do a mouse click.


Happy Clip'n!
Jody

http://www.notetab.net

Subscribe, UnSubscribe, Options
mailto:Ntb-Clips-Subscribe@yahoogroups.com
mailto:Ntb-Clips-UnSubscribe@yahoogroups.com
http://groups.yahoo.com/group/ntb-clips

#8277 From: "Dick Gascoigne" <dick.gascoigne@...>
Date: Wed Mar 6, 2002 12:30 pm
Subject: RE: Saving defaults in a valuelist
bobbit_singa...
Send Email Send Email
 
Thanks to all who responded.  I actually did something similar to Martyn's
suggestion just before I got it.  Used a Set instead of StrReplace.

It all came together nicely.  Now we can take one huge print file with 1,000's
of documents in it, and split it up to be sent to multiple printers
simultaneously. With the capability to specify which printers are to be used via
the checkboxes.

Neat stuff.  Not bad for a "text editor", Eric ;-)))

Best Regards,

Dick Gascoigne
--
Appic (S) Pte Ltd
74A Amoy Street; Singapore 069893
Tel: (+65) 6225-9908  Fax: (+65)6 225-9092
Email: dick.gascoigne@...
Web:  www.appic.com




[Non-text portions of this message have been removed]

#8278 From: tenu@...
Date: Wed Mar 6, 2002 5:16 pm
Subject: Re: simulating mouse click with ^!keyboard command
jorigami
Send Email Send Email
 
On 5 Mar 2002, jaytee556 wrote:

> Is it possible to simulate a mouse click with the ^!keyboard
> command?  I am writing a clip that will go to a php page, tab to a
> radio button selection.  I then need to click on the selection.  Enter
> merely makes a submission without making the selection and I haven't
> found how to do a mouse click.
>

You could try NaughtyMouse:
http://vc.softdepia.com/


Jorma

#8279 From: "...Tyrell..." <tyrell_rrodeo@...>
Date: Thu Mar 7, 2002 11:52 pm
Subject: Re: [NRN] Re: SearchArray & SortArray
tyrell_rrodeo
Send Email Send Email
 
>My idea for SearchArray:
>^!SetArray %ARY%=Home;bark;dog;cat;bird;fish
>^!Set %X%=^$SearchArray(^%ARY%,"cat")$
>^%X%=4
>
>would provide a way to find the index of an array element without
>manual entry and without needing to loop through each element to see
>if it is the one you need.

Who need loops ;-)

; - setup
^!Set %FIND_STR%="dog"
^!Set %DELIMITER%=";"
^!SetListDelimiter ^%DELIMITER%
^!SetArray %ARRAY%="Home;bark;dog;cat;bird;fish"
; - all in one long line
^!Set
%ARY_POS%="^$StrCount("^%DELIMITER%";"^$StrCopyLeft("^%DELIMITER%^%ARRAY%";^$Str\
Pos("^%FIND_STR%";"^%ARRAY%";0)$)$";0;0)$"
; - split in seperate commands
;^!Set %ARY_POS%=^$StrPos("^%FIND_STR%";"^%ARRAY%";0)$
;^!Set %ARY_POS%="^$StrCopyLeft("^%DELIMITER%^%ARRAY%";^%ARY_POS%)$"
;^!Set %ARY_POS%="^$StrCount(";";"^%ARY_POS%";0;0)$"
; - show output ... (zero) means string not found in array
^!INFO [L]Found "^%FIND_STR%" in Array position (^%ARY_POS%)

Note: with large array's (array length, not size) loops will be faster. (+1500)

Cheers
...Tyrell...


_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com

#8280 From: "Michael Gerholdt" <keywordz@...>
Date: Sat Mar 9, 2002 10:32 pm
Subject: Make Topstyle available
michaelgerholdt
Send Email Send Email
 
I recently installed Topstyle but the topstyle clips still do not find it or
consider it available.

How do I get NoteTab to recognize and use it?

thanks,
Mike

#8281 From: "john041650" <john041650@...>
Date: Sat Mar 9, 2002 11:21 pm
Subject: Re: Make Topstyle available
john041650
Send Email Send Email
 
Hi Michael,

Recently when I upgraded my operating system from Windows ME to
Windows 2000, I suddenly had the same problem you have.  NoteTab just
would not recognize that TopStyle was legally installed.  I pulled
out my receipt showing it was paid in full and held it up to the
monitor to prove it, but NoteTab Pro still didn't believe me I guess..

So I wrote a little clip that solved the problem.  I actually prefer
this clip because it first checks to make sure the CSS file is
actually a CSS file (meaning the name ends in .css).. (All my
stylesheets are external ones, if yours aren't you may want to remove
the first line in the clip).

John :)

; EDITS THE CURRENT CSS FILE
^!If "^$GetExt(^**)$" <> ".css" Oops

^!Shell "C:\Program Files\Bradbury\TopStyle2.5\TopStyle25.exe" "^**"
^!FocusApp Bradsoft*
^!GoTo End

:OOPS
^!Info The current file is not a CSS file, try again.





--- In ntb-clips@y..., "Michael Gerholdt" <keywordz@k...> wrote:
> I recently installed Topstyle but the topstyle clips still do not
find it or
> consider it available.
>
> How do I get NoteTab to recognize and use it?
>
> thanks,
> Mike

#8282 From: Jody <av1611@...>
Date: Sat Mar 9, 2002 11:54 pm
Subject: Re: [Clip] Make Topstyle available
notetabber
Send Email Send Email
 
Hi Mike,

>I recently installed Topstyle but the topstyle clips still do not
>find it or consider it available.
>
>How do I get NoteTab to recognize and use it?

Try rebooting Windows if restarting NoteTab does not help.  After
rebooting if TS still does not open from NoteTab, reinstall TS.
That will usually get it going.  (See if TS is in the registry
under AppPaths or whatever it is that programs register themselves.)

> NoteTab just would not recognize that TopStyle was legally
> installed.  I pulled out my receipt showing it was paid in full
> and held it up to the monitor to prove it, but NoteTab Pro
> still didn't believe me I guess..

ROFL !!!

Happy Clip'n!
Jody

http://www.notetab.net

Subscribe, UnSubscribe, Options
mailto:Ntb-Clips-Subscribe@yahoogroups.com
mailto:Ntb-Clips-UnSubscribe@yahoogroups.com
http://groups.yahoo.com/group/ntb-clips

#8283 From: "Fred Morris" <rickmor@...>
Date: Tue Mar 12, 2002 10:02 pm
Subject: Re: [Clip] Clone Doc Clip
rickmor@...
Send Email Send Email
 
Hi Clippers,

Does anyone out there remember the Clone Doc Clip, I can't seem to find it
on the NoteTab site and Jody doesn't recall it.  I'm sure it existed because
I remember using it frequently.  I recently had to wipe my system completely
and re-install my OS and software but I never backed up all of my NoteTab
utils, so if anyone has a copy of the said Clip I would be gratefull if they
could e-mail it to me via rickmor@...

Thanks in anticipation, why not visit my web page at
http://www.qold.freeserve.co.uk and have a browse?

Fred Morris.

#8284 From: stephen riddle <stephen@...>
Date: Wed Mar 13, 2002 3:04 am
Subject: Re: [Clip] Clone Doc Clip
stephenriddle
Send Email Send Email
 
Hi Fred,
What all did it do? It is possible you re-named it.

There have been a variety of clips pass by having to do with copying and
backing up files. . . Jody's Clip Library by itself has a bunch.
(It might be something someone could just re-write too.  I'v noticed that if
I forget what I call a clip and therefore have to re-write it, the second
edition usually works better.)
T'care,
Stephen

> Does anyone out there remember the Clone Doc Clip, I can't seem to find it
> on the NoteTab site and Jody doesn't recall it.  I'm sure it existed
> because I remember using it frequently.  I recently had to wipe my system
> completely and re-install my OS and software but I never backed up all of
> my NoteTab utils, so if anyone has a copy of the said Clip I would be
> gratefull if they could e-mail it to me via rickmor@...
>
>

#8285 From: Jody <av1611@...>
Date: Wed Mar 13, 2002 3:19 am
Subject: Re: [Clip] Clone Doc Clip
notetabber
Send Email Send Email
 
Hi Fred,

What did it do exactly?

>Does anyone out there remember the Clone Doc Clip,...


Happy Clip'n!
Jody

http://www.notetab.net

Subscribe, UnSubscribe, Options
mailto:Ntb-Clips-Subscribe@yahoogroups.com
mailto:Ntb-Clips-UnSubscribe@yahoogroups.com
http://groups.yahoo.com/group/ntb-clips

#8286 From: "Fred Morris" <rickmor@...>
Date: Wed Mar 13, 2002 12:52 pm
Subject: Re: [Clip] Clone Doc Clip
rickmor@...
Send Email Send Email
 
Hi Jody,

What the clip did when launched was to create a copy of the active document.
Say for example you had a document called existing.doc, it would create a
new version of it giving it a name like existing01.doc.  The clip could be
configured to auto rename as above or request a name from the user.

Regards Fred
----- Original Message -----
From: "Jody" <av1611@...>
To: <ntb-clips@yahoogroups.com>
Sent: Wednesday, March 13, 2002 3:19 AM
Subject: Re: [Clip] Clone Doc Clip


> Hi Fred,
>
> What did it do exactly?
>
> >Does anyone out there remember the Clone Doc Clip,...
>
>
> Happy Clip'n!
> Jody
>
> http://www.notetab.net
>
> Subscribe, UnSubscribe, Options
> mailto:Ntb-Clips-Subscribe@yahoogroups.com
> mailto:Ntb-Clips-UnSubscribe@yahoogroups.com
> http://groups.yahoo.com/group/ntb-clips
>
>
>
>
>
> Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
>
>
>

#8287 From: "Ville Saalo" <villes@...>
Date: Wed Mar 13, 2002 1:48 pm
Subject: Test
Ville_Saalo
Send Email Send Email
 
Hello? This working now?

#8288 From: "Ville Saalo" <villes@...>
Date: Wed Mar 13, 2002 2:36 pm
Subject: Selecting, finding, something
Ville_Saalo
Send Email Send Email
 
>>Hello? This working now?
>it is ..


Oh, great. :-) I actually didn't expect it to, I've posted a few messages
before. I hope they won't drop here all at once now... ;-)
    Sooo, let's get into business.. I signed to this mailing list some month
ago but didn't need to post until now. (And like I explained it didn't work
first - I mailed to Jody a couple of times, dunno if he did something but
this definitely works now :-).
    So my questions.. First one was about converting outlines into html,
but Jody already pointed me to his library (incredible stuff - thanks! :-).
    Then...
1) When using "^!Select 0", can I somehow make it leave the cursor after
the selection? Or is there an other command for this?
2) How do I make the clip recognize if ^!Find doesn't actually find anything?

    -Ville

#8289 From: Jody <av1611@...>
Date: Wed Mar 13, 2002 2:59 pm
Subject: Re: [Clip] Test
notetabber
Send Email Send Email
 
Hi Ville,

Yes.

>Hello? This working now?


Happy Clip'n!
Jody

http://www.notetab.net

Subscribe, UnSubscribe, Options
mailto:Ntb-Clips-Subscribe@yahoogroups.com
mailto:Ntb-Clips-UnSubscribe@yahoogroups.com
http://groups.yahoo.com/group/ntb-clips

#8290 From: Jody <av1611@...>
Date: Wed Mar 13, 2002 4:15 pm
Subject: Re: [Clip] Selecting, finding, something
notetabber
Send Email Send Email
 
Hi Ville,

>1) When using "^!Select 0", can I somehow make it leave the cursor after
>the selection? Or is there an other command for this?

Try ^!Jump Select_End, look up Jump in help.

>2) How do I make the clip recognize if ^!Find doesn't actually
>find anything?

I do not understand your question.  Do not use the "S" option if
you want a message saying the search criteria was not found.  Use
^!IfError Label else Label if you want the Clip to continue
somewhere else if it does not find anything.  Here is an example.

:NextWord
code
^!IfError ReStart else Exit
code
^!Goto NextWord
code
:Restart
code

Happy Clip'n!
Jody

http://www.notetab.net

Subscribe, UnSubscribe, Options
mailto:Ntb-Clips-Subscribe@yahoogroups.com
mailto:Ntb-Clips-UnSubscribe@yahoogroups.com
http://groups.yahoo.com/group/ntb-clips

#8291 From: Stephen Riddle <stephen@...>
Date: Thu Mar 14, 2002 8:58 am
Subject: Re: [Clip] Clone Doc Clip
stephenriddle
Send Email Send Email
 
Hi Fred,
I really don't remember such a clip.
I thought I'd see what I could do.
  I'm sure what you were thinking of was not EXACTLY like this:

> What the clip did when launched was to create a copy of the active document.
> Say for example you had a document called existing.doc, it would create a
> new version of it giving it a name like existing01.doc.  The clip could be
> configured to auto rename as above or request a name from the user.
>

I really don't remember such a clip.
I thought I'd see what I could do.
  I'm sure what you were thinking of was not EXACTLY like this:

H="Clone Dr."
^!Set %outNumber%=""
^!SetWizardTitle I am the Doc Cloner, hence the Clone Doctor^$StrFill("! **
!";15)$
^!SetWizardLabel I CAN FILL YOUR HARD DRIVE FULL OF REPETITIVE INFORMATION,
^$StrFill("Ha Ha Ha! Ha!";32)$
^!Set %which%=^?{(T=O)Which file are you cloning?=^##}; %where%=^?{(T=D)Where do
you wish to place this clone?=^$GetPath(^##)$}; %who%=^?{What name do you wish
to use for the clone?=^$GetName(^##)$}; %extension%=^?{(H=5)What file extension
should we use for this clone (include the
dot)?=_^$GetExt(^##)$|.bak|.dat|.info}; %how%=^?{(T=L;H=5)What manner of
increment do you wish to use?==_Numbers (as file1, file2, file3,
file4)^=numbers|Capital letters (as fileA, fileB, fileC)^=capitals|Miniscule
leters (as filea, fileb, filec)^=miniscule|A Number generated by the current
time (file^$GetDate(yyyymmddhhmm)$^=date}; %information%=^?{(T=W)Instructions on
using this clip=Note:^PWhatever directory and file you choose to clone if there
is not already a file there named by the name you choose in the target
directory, no increment will be made.}
^!If ^$GetFileSize("^%where%^%who%^%level%^%extension%")$ > 0 NEXT ELSE doIt
^!IfSame ^%how% date NEXT ELSE SKIP_2
^!Set %outNumber%=^$GetDate(yyyymmddhhmm)$
^!GoTo doIt
^!IfSame ^%how% Numbers NEXT ELSE SKIP_2
^!SetArray %list%=0;1;2;3;4;5;6;7;8;9
^!Inc %index%
^!IfSame ^%how% capitals NEXT ELSE SKIP
^!SetArray %list%=A;B;C;D;E;F;G;H;I;J;K;L;M;N;O;P;Q;R;S;T;U;V;W;X;Y;Z
^!IfSame ^%how% miniscule NEXT ELSE SKIP
^!SetArray %list%=a;b;c;d;e;f;g;h;i;j;k;l;m;n;0;p;q;r;s;t;u;v;w;x;y;z
:targetID
^!Set %inNumber%=1
:bigLoop
^!Set %remainder%=""; %outNumber%=""
^!Set %draw%=^%inNumber%; %scoop%=^%list0%
:baseLoop
^!Set %remainder%=^$Calc(^%draw% MOD ^%scoop%)$
^!If ^%remainder%=0 NEXT ELSE SKIP
^!Set %remainder%=26
^!Set %draw%=^$Calc((^%draw% -1) DIV ^%scoop%)$
^!Set %outNumber%=^%list^%remainder%%^%outNumber%
^!If ^%draw% < 1 outNumbers else NEXT
^!Set %scoop%=^$Calc(^%scoop% * ^%list0%)$
^!GoTo baseLoop
:outNumbers
^!Set %level%=^%outNumber%
:CheckAvailabilitOfTargetId
^!If ^$GetFileSize("^%where%^%who%^%level%^%extension%")$ > 0 NEXT ELSE doIt
^!Inc %inNumber%
^!GoTo bigLoop
:doIt
^!TextToFile "^%where%^%who%^%outNumber%^%extension%" "^$GetFileText(^%which%)$"

#8292 From: stephen riddle <stephen@...>
Date: Thu Mar 14, 2002 9:11 am
Subject: Re: [Clip] Clone Doc Clip
stephenriddle
Send Email Send Email
 
Hi Fred and Everybody,

I forgot to mention,
There's an error logic in the section of the clip where it assigns letters or
whatever to the file name.
I'm getting tired, been working on the clip since choir practice.  (for some
reason, I forgot the difference between DIV and MOD.)

Any way, if you select capital letters it should work fine for up to around
775 (whatever the square of 26 is) clones of your file. Then it starts
deleting older files. That number will be only 100 or so for numbers.

Have fun anyway

Stephen

#8293 From: "Fred Morris" <rickmor@...>
Date: Thu Mar 14, 2002 6:49 pm
Subject: Re: [Clip] Clone Doc Clip
rickmor@...
Send Email Send Email
 
Hi Steve and all

Thanks for all your efforts, I have now located the Clip I was referring to.
It is available for download at
http://junior.apk.net/~jbarta/notetab/ntclip_snippets/
which saves me having to write it.

Many thanks once again to Warner who sent me the address.  If you have never
visit the above site it is worth a look in if you are into HTML authoring
and JavaScript, there are on-line mini tutorials and you can become a member
for a small fee as I did and receive added benefits and access to the
members areas.  Happy Clipping

Fred Morris




----- Original Message -----
From: "stephen riddle" <stephen@...>
To: <ntb-clips@yahoogroups.com>
Sent: Thursday, March 14, 2002 9:11 AM
Subject: Re: [Clip] Clone Doc Clip


> Hi Fred and Everybody,
>
> I forgot to mention,
> There's an error logic in the section of the clip where it assigns letters
or
> whatever to the file name.
> I'm getting tired, been working on the clip since choir practice.  (for
some
> reason, I forgot the difference between DIV and MOD.)
>
> Any way, if you select capital letters it should work fine for up to
around
> 775 (whatever the square of 26 is) clones of your file. Then it starts
> deleting older files. That number will be only 100 or so for numbers.
>
> Have fun anyway
>
> Stephen
>
>
>
>
> Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
>
>
>

#8294 From: stephen riddle <stephen@...>
Date: Fri Mar 15, 2002 1:11 am
Subject: Re: [Clip] Clone Doc Clip
stephenriddle
Send Email Send Email
 
Hi Fred,
You said it,
His site got me started.
Take care,
Stephen

#8295 From: "Don Passenger" <dpasseng@...>
Date: Sun Mar 17, 2002 4:43 pm
Subject: Re: Building a mysql update from an input
dpasseng
Send Email Send Email
 
Error: first line in starting point should have started like this ...
INSERT INTO Organizations VALUES

I am up to here and getting an error:
;convert mysql input to update
^!Jump Text_Start

;set array of table column names - later do this so it offers drop down list
2 ***************
^!SetArray
%FieldNames%=organization_id;organization;addr;city;state;zip;homecountry;ph
one;fax;url;email;contact;description

:LineChange
;start first line for conversion and will loop back for each line ****
^!Replace "INSERT" >> "UPDATE"
^!Replace "VALUES" >> "SET"
^!Replace "(" >> ""
^!Select WORD
;build variable for WHERE
^!Keyboard CTRL+X


;question - why error in following line
;help section of notetab doesn't contain many examples
;do I need quotes or something around it?
^!Set %mySqlPrimaryKey% = WHERE ^%FieldNames1%=^$GetClipboard$
^!Info ^%mySqlPrimaryKey%


--
Don Passenger
mailto:dpasseng@...
home: http://www.iserv.net/~dpasseng
work: http://www.grcourt.org

#8296 From: "Don Passenger" <dpasseng@...>
Date: Sun Mar 17, 2002 3:43 pm
Subject: Building a mysql update from an input
dpasseng
Send Email Send Email
 
I just started playing with mysql/php.  Very neat stuff.  I used phpmyadmin
to output a database table.  I have (before I probably understand what I am
doing) taken the output and made changes that I now want to load back into
the table.  What I need to do is take my lines I received when outputing
from the table -- called starting point in the following explanation --,
modify them (with a clip I presume) -- so that they are like the ending
point reflected below -- and then I can update my datatable.

I have tried getting the steps necessary put down into a stepwise
progression list.  I figure the first part will be done with a search and
replace, but after that .... I will be studying.  Any thoughts on any step
would be appreciated as I try to build this thing.

Starting Point:

UPDATE Organizations VALUES (20, 'Organization Name', 'Organization
Address', 'Organization City', 'ST', '99999', 'USA', '555-555-5555',
'555-555-5555', 'http://www.OrganizationDomainName.com',
'email@...', Contact Name, 'Comments about the
Site.');


Ending Point:

UPDATE Organizations SET organization='Organization Name',
addr='Organization Address', city='Organization City', state='ST',
zip='99999', homecountry='USA', phone='555-555-5555', fax='555-555-5555',
url='http://www.OrganizationDomainName.com',
email='email@...', contact='Contact Name',
description='Comments about the Site.' WHERE organization_id=20;

List of fields (in this example):
    organization_id -- use this after where
  organization -- use these sequentially after set
  addr
  city
  state
  zip
  homecountry
  phone
  fax
  url
  email
  contact
  description

(question: I assume I need to load these into an array so that I can get
them back when I need them -- note for the next table I work on, the fields
list will have a different number of items and different names)

Steps to get from Starting Point to Ending Point

1. change "INSERT" into "UPDATE" (question: I assume I will do this all one
line at a time).

2. change "VALUES" to "SET"

3. take the primary key (in this example it is 20) to end (replace the ")"
with it) and add "WHERE *FIELD*=20
*FIELD* is the primary key field which is the first field in the list of
fields above (here organization_id)  (question: is it better to load this to
a variable and not move cursor instead waiting until I get to the end of the
line)

4. Return cursor to "(" (unless I went with the variable thought above)

5. Replace "(" with *FIELD*="
*FIELD* to come from second item in list of fields for this table (here
organization)

6. find and replace each successive ', ' with ', *FIELD*=' where *FIELD* is
the next successive item in the field list starting with number three until
done.

7. I suppose we should report error if the number of field items does not
match the number of ', ' instances.

8. move to next line if there is one and repeat else terminate

--
Don Passenger
mailto:dpasseng@...
home: http://www.iserv.net/~dpasseng
work: http://www.grcourt.org

#8297 From: "Don Passenger" <dpasseng@...>
Date: Sun Mar 17, 2002 11:12 pm
Subject: Re: [Clip] Re: Building a mysql update from an input
dpasseng
Send Email Send Email
 
I am progressing.  This seems to work pretty well, but it doesn't stop "when
it should."  I get not found on replace because it apparently doesn't stop
when it should. Comments welcome ... currently I am up to here:

;convert mysql input to update

;make NULL's conform to data standard for other variables
^!Replace ", NULL," >> ", 'NULL'," WSA
^!Jump Text_Start

^!Set %MaxRow%=^$GetLineCount$


;set array of table column names *********************
^!SetArray
%FieldNames%=organization_id;organization;addr;city;state;zip;homecountry;ph
one;fax;url;email;contact;description

:LineChange
;start first line for conversion and will loop back for each line ****

^!Replace "INSERT INTO" >> "UPDATE"
^!Replace "VALUES" >> "SET"
^!Replace "(" >> ""
^!Select WORD
;build variable for WHERE
^!Keyboard CTRL+X
^!Set %mySqlPrimaryKey%="WHERE ^%FieldNames1%=^$GetClipboard$"

^!Set %Counter%=2
:LoopForFieldNames
;run through and insert each field name
^!If ^%Counter% = 2 FirstField ELSE SecondField
:FirstField
^!Replace ", '" >> " ^%FieldNames^%Counter%%='"
^!Goto ContinueFields
:SecondField
^!Replace ", '" >> ", ^%FieldNames^%Counter%%='"
;^!Info ^%FieldNames^%Counter%% ^%Counter%

:ContinueFields
^!Continue [Question]

^!If ^%FieldNames0% = ^%Counter% DoneFieldNames
;^!Info ^%Counter%
^!Inc %Counter%
^!Goto LoopForFieldNames


:DoneFieldNames
^!Info DoneFieldNames
^!Replace "');" >> "' ^%mySqlPrimaryKey%;"

^!Jump +1
^!Inc %Row%
^!If ^%Row% <= ^%MaxRow% LineChange

--
Don Passenger
mailto:dpasseng@...
home: http://www.iserv.net/~dpasseng
work: http://www.grcourt.org

#8298 From: "Don Passenger" <dpasseng@...>
Date: Mon Mar 18, 2002 5:17 am
Subject: Re: [Clip] Re: Building a mysql update from an input
dpasseng
Send Email Send Email
 
This seems to be working okay:

**START

;convert mysql input to update

;make NULL's conform to data standard for other variables
^!Replace ", NULL," >> ", 'NULL'," WSA
^!Jump Text_Start

^!Set %MaxRow%=^$GetLineCount$

;set array of table column names *********************
^!SetArray
%FieldNames%=organization_id;organization;addr;city;state;zip;homecountry;ph
one;fax;url;email;contact;description

:LineChange
;start first line for conversion and will loop back for each line ****

^!Replace "INSERT INTO" >> "UPDATE"
^!IfError FinishNull
^!Replace "VALUES" >> "SET"
^!Replace "(" >> ""
^!Select WORD
;build variable for WHERE
^!Keyboard CTRL+X
^!Set %mySqlPrimaryKey%="WHERE ^%FieldNames1%=^$GetClipboard$"

^!Set %Counter%=2
:LoopForFieldNames
;run through and insert each field name
^!If ^%Counter% = 2 FirstField ELSE SecondField
:FirstField
^!Replace ", '" >> " ^%FieldNames^%Counter%%='"
^!Goto ContinueFields
:SecondField
^!Replace ", '" >> ", ^%FieldNames^%Counter%%='"

:ContinueFields
^!If ^%FieldNames0% = ^%Counter% DoneFieldNames
^!Inc %Counter%
^!Goto LoopForFieldNames


:DoneFieldNames
^!Replace "');" >> "' ^%mySqlPrimaryKey%;"

^!Jump +1
^!If ^$GetRow$ <= ^%MaxRow% LineChange

:FinishNull
^!Replace "'NULL'," >> "NULL," WSA

**END

Paste this line into a text file a few times to test the clip:


INSERT INTO Organizations VALUES (20, 'Organization Name', 'Organization
Address', 'Organization City', 'ST', '99999', 'USA', '555-555-5555', NULL,
'http://www.OrganizationDomainName.com', 'email@...',
'Contact Name', 'Comments about the Site.');

Comments very welcome!

#8299 From: Larry Hamilton <lm_hamilton@...>
Date: Mon Mar 18, 2002 5:31 am
Subject: Re: [Clip] Re: Building a mysql update from an input
lm_hamilton
Send Email Send Email
 
Don,

I have seen your posts on this and find it
interesting.

I use PHP and MySQL with HNGS, but have not gotten a
few specialized clips in an all-encompassing library.

I am out of town all week for work, so not able to
give much in reply/suggestions (I am answering this
over the web). (I use SQL at work all the time, too).

I look forward to seeing what you come up with.

Larry Hamilton
Webmaster
Hamilton National Genealogical Society, Inc.

--- Don Passenger <dpasseng@...> wrote:
> I am progressing.  This seems to work pretty well,
> but it doesn't stop "when
> it should."  I get not found on replace because it
> apparently doesn't stop
> when it should. Comments welcome ... currently I am
> up to here:


=====
Larry Hamilton mailto:lm_hamilton@...
Hamilton National Genealogical Society, Inc.
http://www.HamiltonGenSociety.org/
My Web Site:     http://notlimaH.tripod.com

__________________________________________________
Do You Yahoo!?
Yahoo! Sports - live college hoops coverage
http://sports.yahoo.com/

#8300 From: "jw" <woodbridge@...>
Date: Mon Mar 18, 2002 9:40 am
Subject: modify wsftp wizard to allow input of target directory?
jadamwood
Send Email Send Email
 
I'm trying to modify Jody's wsftp clip to upload files from my computer
to an ftp server. I want to be able to specify the upload subdirectory
rather than having many of them hard-coded for me to choose from as the
clip is presently written.

At present the code reads:

/snip wizard code/
%ServerPath%=^?{(H=6)Enter server upload
path==_^$GetValue("WsFtp:UPath1")$|^$GetValue("WsFtp:UPath2")$|^$GetValu
e("WsFtp:UPath3")$|^$GetValue etc etc

and I tried:

%ServerPath%=^?{(H=6)Enter server upload path}

this takes input and doesn't give an obvious error, but doesn't deliver
the file to the right subdirectory off the root.

what is the correct code to use here??

Jonathan

Messages 8271 - 8300 of 23890   Oldest  |  < Older  |  Newer >  |  Newest
Add to My Yahoo!      XML What's This?

Copyright © 2010 Yahoo! Inc. All rights reserved.
Privacy Policy - Terms of Service - Guidelines NEW - Help