Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

scripting graphic UI--Couldn't this be done?

DancesWithRobots Soyer
Registered User
Join date: 7 Apr 2006
Posts: 701
07-29-2008 08:37
My problem with scripting is, syntax. Watching out for all the little mistakes like forgetting about that double "=" and the ";" at the end of the line.

My other problem, is watching out for all the parameters that something like rotation, or particles, or primitive parameters need. Same thing I guess.

Frankly, it's hard to catch the mistakes when you hardly know enough to ask the question.

*mumble* years ago I had a program Called "GameMaker" from Activision that ran on a very popular home computer of the day. (Trying not to date myself TOO much.) It had a bunch of example games based on popular game consoles of the time, and quite a few other sound and graphic demos that you could study and learn from.

What was interesting about it, was, that you did most of the coding from a commands and functions that came from a drop down list accessed via a joystick. Once you chose a command, a line containing the code would appear in your programming area, along with some text fields or menus to fill in.

My point is, let's say I picked something like llSetPrimitiveParams, it would appear in the work area, along with a bunch of drop down menus to pick the type of primitive, and then maybe some blank spots where you could fill in the parameters, or perhaps pick them from a list, or use a slider thingy. (Hmm. . .not too different from the way prims are manipulated, come to think of it.) On something like prims, or particles, maybe you could even display a shape.

Whenever you do something that needs to be ended, the followup command (whatever it is) could appear a couple lines down, with a blank in between the parts so that an appropriate command or statement or whatever could be inserted, and then ITS fill in boxes would be ready to populate with appropriate parameters or variables.

Yes, I've seen Scratch4LSL, and that's the sort of thing I'm talking about, but Scratch scripts put in all sorts of stuff that it can do, whether it's being used or not.

Like I said, I've seen this sort of thing done before. And I've seen progress made in this direction with LSL. But I don't need anyone to ask me questions about what it is I want to do--I just need an easy way to put whatever the hell it is belongs in between the second and third commas, without having to open up a browser window and figure out how to look it up, and remember to put the semicolon in place.
_____________________
"Two lives I have.
One life I live. One life I dream.
In dreams I remember the better in me."
Yumi Murakami
DoIt!AttachTheEarOfACat!
Join date: 27 Sep 2005
Posts: 6,860
07-29-2008 08:50
Oh my god, are you talking about David Crane's Game Maker?

Um, I just dated myself too, I guess. :p

It is probably possible, but making such an editor in a usable way - allowing for all the assorted gotchas that come up as a result - would be quite difficult.
Hewee Zetkin
Registered User
Join date: 20 Jul 2006
Posts: 2,702
07-29-2008 10:49
Some IDEs do at least part of this. Maybe what you'd really want is like a LSL language and library plugin for Eclipse or NetBeans or something. I'm not sure if any of them do FULL syntax layouts for you, but a lot of them will automatically look up library functions and give you the names of parameters; I believe also the possible value of parameters where the parameter type is an enumeration or boolean value. I have no idea how far LSLEditor goes on that score, as I've never tried it (vim is my choice of editor for ALL programming).

http://www.eclipse.org/
http://www.netbeans.org/
Johan Laurasia
Fully Rezzed
Join date: 31 Oct 2006
Posts: 1,394
07-29-2008 12:23
I generally keep the wiki up on a web page when I'm scripting, and refer to it often. The more your script, the less you'll have trouble with syntax. For example, when I first started scripting, I had to look up the syntax for a listen event, yet...

listen (integer channel, string name, key id, string message)

... I can now type it from memory.

It's just a matter of practice, don't look for the 'easy way out'. Just keep looking it up on the wiki until it's committed to memory.


http://www.secondscripter.com
_____________________
My tutes
http://www.youtube.com/johanlaurasia
Vlad Bjornson
Virtual Gardener
Join date: 11 Nov 2005
Posts: 650
07-29-2008 13:59
I have seen something similar to what you are looking for, DancesWithRobots. It was a program for Windows that sort of watched what you were typing in the LSL editor and helped by providing the proper syntax, function variables, etc. It wasn't totally automated, but it did look pretty handy. Having trouble finding it again...

aha. here it is. called AutoScript.

http://www.slexchange.com/modules.php?name=Marketplace&file=item&ItemID=675999


From: Johan Laurasia
It's just a matter of practice, don't look for the 'easy way out'. Just keep looking it up on the wiki until it's committed to memory.


Don't see how using a more convenient reference is taking an 'easy way out'. What's that difference between referencing a web page vs. having something like the OP describes?
_____________________
I heart shiny ! http://www.shiny-life.com
Osgeld Barmy
Registered User
Join date: 22 Mar 2005
Posts: 3,336
07-29-2008 16:31
course you can put your mouse over the function or event in the script editor window and get a syntax layout

but yes ive always felt the scripting needed to be simpler, i started this opinion in simpler times tho when lsl was expected to have many mini scripts to acheive the desired function

course that LL idea died the second someone who could script logged in

you can do everything in sl with simple point and click interfaces ,,, to a point, if you want to make a pair of pants well it can be done, if you want to make the best damn pair of pants ever then you need to be an expert

scripting does not have this luxury

dunno maybe this is a good excuse for me to try out a new scripting language and make my own script maker
Jesse Barnett
500,000 scoville units
Join date: 21 May 2006
Posts: 4,160
07-29-2008 16:43
I have heavily modified my Scite so that f you type in "if" for example and then hit a key, it will add in the parenthesis, brackets and place the cursor inside the left parenthesis so that you can enter the first variable to test. But by the time you get good enough to set it up that way, you already know all of the syntax anyways:p

Give LSLEditor a try, it already does most of what you need. Plus you can hit F1 on any entry to bring up the wiki entry and the lslint plugin will tell you any mistakes you have made.
_____________________
I (who is a she not a he) reserve the right to exercise selective comprehension of the OP's question at anytime.
From: someone
I am still around, just no longer here. See you across the aisle. Hope LL burns in hell for archiving this forum
Jesse Barnett
500,000 scoville units
Join date: 21 May 2006
Posts: 4,160
07-29-2008 16:57
From: Osgeld Barmy

but yes ive always felt the scripting needed to be simpler, i started this opinion in simpler times tho when lsl was expected to have many mini scripts to acheive the desired function
...........................
dunno maybe this is a good excuse for me to try out a new scripting language and make my own script maker


There is no way to convey just how simple LSL is compared to some of the other languages, some with a few thousand functions and variables. I am saying this because I never coded until LSL and am just now making a serious foray into other languages. Autoit is a fairly simple, yet powerful language and yet the following script took me a month to get working like I want, many more gray hairs now:) Actually it would have been impossible if I wouldn't have at least learned the basics with LSL.

CODE
#Region ;**** Directives created by AutoIt3Wrapper_GUI ****
#AutoIt3Wrapper_Icon=Plot Wizard dir\PW.ico
#AutoIt3Wrapper_Outfile=Plot Wizard\Plot Wizard.exe
#AutoIt3Wrapper_UseAnsi=y
#AutoIt3Wrapper_Run_Au3check=n
#AutoIt3Wrapper_Tidy_Stop_OnError=n
#EndRegion ;**** Directives created by AutoIt3Wrapper_GUI ****
#include <Array.au3>
#include <ButtonConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <GuiListView.au3>
#include <ListviewConstants.au3>
#include <ProgressConstants.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>

Global $autosave = "C:\Program Files\Plot Wizard\Autosave\*.pdf"
Global $irfandir = "C:\Program Files\IrfanView"
Global $irfanexe = "i_view32.exe "
Global $pdffactorykey = "HKEY_CURRENT_USER\Software\FinePrint Software\pdfFactory3\FinePrinters\pdfFactory Pro"
Global $pdfxchange = "C:\Program Files\Tracker Software\PDF-XChange Viewer\pdf-viewer\PDFXCview.exe"
Global $pdfthumb = "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.pdf"
Global $printer = " /print=pdfFactory Pro"
Global $selectmultiple = "Hold down Ctrl or Shift to choose multiple files."
Global $_8x11, $_11x17, $_24x36, $array, $approved, $convertbutton, $editbutton, $ext
Global $fielduse, $filecount, $fileitem, $fileoption, $footer, $footeron, $forapproval
Global $incr, $license, $none, $papername, $papersize, $percent, $printbutton
Global $printerarray[1], $progressbar, $revfielduse, $rotbutton
Global $rotdirection, $rotleft, $rotright, $showdlg, $sortorder

;SETUP
IniWrite("C:\Program Files\IrfanView\i_view32.ini", "Batch", "AdvResize", 1)
IniWrite("C:\Program Files\IrfanView\i_view32.ini", "Print", "Option", 2)
IniWrite("C:\Program Files\IrfanView\i_view32.ini", "Print", "Centered", 1)
IniWrite("C:\Program Files\IrfanView\i_view32.ini", "Print", "Printer", "pdfFactory Pro")
IniWrite("C:\Program Files\IrfanView\i_view32.ini", "Print", "Orient", 2)
IniWrite("C:\Program Files\IrfanView\i_view32.ini", "Print", "Size", "ARCH D")
IniWrite("C:\Program Files\IrfanView\i_view32.ini", "Batch", "AdvResizeW", 36)
IniWrite("C:\Program Files\IrfanView\i_view32.ini", "Batch", "AdvResizeH", 24)
IniWrite("C:\Program Files\IrfanView\i_view32.ini", "Batch", "AdvResizeL", 36)
IniWrite("C:\Program Files\IrfanView\i_view32.ini", "Batch", "AdvResample", 0)
IniWrite("C:\Program Files\IrfanView\i_view32.ini", "ImPDF", "EncodingActive", 1)
RegWrite("HKEY_CURRENT_USER\Software\FinePrint Software\pdfFactory3", "AutoSaveDir", "REG_EXPAND_SZ", "C:\Program Files\Plot Wizard\AutoSave")
RegWrite($pdffactorykey, "SkipPrintDialog", "REG_DWORD", 0)
RegWrite($pdffactorykey, "collate", "REG_DWORD", 1)
RegWrite($pdffactorykey, "Copies", "REG_DWORD", 1)
RegWrite($pdffactorykey & "\PrinterDriverData", "PdfAction", "REG_DWORD", 0)
RegWrite($pdffactorykey & "\PrinterDriverData", "Orientation", "REG_DWORD", 2)
RegWrite($pdffactorykey & "\PrinterDriverData", "MarginTop", "REG_DWORD", 100)
RegWrite($pdffactorykey & "\PrinterDriverData", "MarginBottom", "REG_DWORD", 100)
RegWrite($pdffactorykey & "\PrinterDriverData", "MarginLeft", "REG_DWORD", 100)
RegWrite($pdffactorykey & "\PrinterDriverData", "MarginRight", "REG_DWORD", 100)
RegWrite("HKEY_CURRENT_USER\Software\Tracker Software\PDFViewer\Annots\Defaults\TypeWriter\TextFormat", "FontSize", "REG_BINARY", "0000000000002440")
;END SETUP

;MAIN GUI
$maingui = GUICreate("Jesse's Plot Wizard", 396, 388, 318, 180)
$folder = ""
$info = GUICtrlCreateMenu("HELP/INFO")
$help = GUICtrlCreateMenuItem("Help", $info)
$about = GUICtrlCreateMenuItem("About", $info)
$license = GUICtrlCreateMenuItem("License", $info)
GUISetState(@SW_SHOW)
Dim $maingui_AccelTable[4][2] = [["^!+{F1}", $fileitem],["^c", $convertbutton],["^d", $editbutton],["^p", $printbutton]]
GUISetAccelerators($maingui_AccelTable)

;BUTTON EDIT
$editbutton = GUICtrlCreateButton("CONVERT ADD DATES ADD FOOTER", 246, 114, 140, 94, $BS_MULTILINE)
GUICtrlSetFont(-1, 14, 400, 0, "Lucida Sans")
GUICtrlSetTip(-1, "Add dates or footer to selected drawings")

;GUI FOOTER
GUICtrlCreateGroup("Dwg Status Footer", 6, 106, 230, 108)
$forapproval = GUICtrlCreateRadio("For Approval", 18, 123, 80, 17)
$approved = GUICtrlCreateRadio("Approved", 18, 143, 80, 17)
$fielduse = GUICtrlCreateRadio("Field Use", 18, 163, 80, 17)
$revfielduse = GUICtrlCreateRadio("Revised Field Use", 106, 163, 112, 17)
$revapproved = GUICtrlCreateRadio("Revised Approved", 106, 143, 112, 17)
$revforapproval = GUICtrlCreateRadio("Revised For Approval", 106, 123, 120, 17)
$none = GUICtrlCreateRadio("None", 90, 179, 64, 25)
GUICtrlSetState(-1, $GUI_CHECKED)
GUICtrlSetFont(-1, 10, 400, 0, "MS Sans Serif")
GUICtrlCreateGroup("", -99, -99, 1, 1)

;GUI PLOT SIZE
GUICtrlCreateGroup("Select Plot Size", 24, 224, 129, 89)
GUICtrlSetFont(-1, 8, 400, 0, "Microsoft Sans Serif")
$_8x11 = GUICtrlCreateRadio("8 1/2 X 11", 32, 240, 81, 17)
$_11x17 = GUICtrlCreateRadio("11 X 17", 32, 264, 81, 17)
$_24x36 = GUICtrlCreateRadio("24 X 36", 32, 288, 81, 17)
GUICtrlSetState(-1, $GUI_CHECKED)
GUICtrlCreateGroup("", -99, -99, 1, 1)

;BUTTON PRINT
$printbutton = GUICtrlCreateButton("PRINT", 214, 241, 172, 54)
GUICtrlSetFont(-1, 14, 400, 0, "Lucida Sans")
GUICtrlSetTip(-1, "Print selected drawings")

;GUI PROGRESS BAR
$progressbar = GUICtrlCreateProgress(78, 330, 300, 20)
$progtext = GUICtrlCreateLabel("Progress:", 15, 330, 44, 20)

;GUI ROTATE DWGS
GUICtrlCreateGroup("", 96, 8, 193, 81)
$rotleft = GUICtrlCreateRadio("Left", 224, 25, 50, 25)
GUICtrlSetFont(-1, 12, 400, 0, "Lucida Sans")
$rotright = GUICtrlCreateRadio("Right", 224, 52, 57, 25)
GUICtrlSetState(-1, $GUI_CHECKED)
GUICtrlSetFont(-1, 12, 400, 0, "Lucida Sans")
$rotbutton = GUICtrlCreateButton("Rotate", 110, 23, 100, 54)
GUICtrlSetFont(-1, 14, 400, 0, "Lucida Sans")
GUICtrlSetTip(-1, "Rotate selected dwgs")
GUICtrlCreateGroup("", -99, -99, 1, 1)

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; MESSAGES ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

;GUI MESSAGES
Local $folder
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
;EDIT
Case $editbutton
_edit()

;EXIT
Case $GUI_EVENT_CLOSE
RegDelete($pdfthumb, "Application")
RegWrite($pdfthumb, "Progid", "REG_SZ", "AcroExch.Document")
Exit

;HELP
Case $help
_help()

;INFO
Case $about
_info()

;LICENSE
Case $license
_license()

;PRINT
Case $printbutton
_print()

;ROTATE
Case $rotbutton
_rotateprints()

EndSwitch
WEnd

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; RADIO ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

Func _radio()
If BitAND(GUICtrlRead($forapproval), $GUI_CHECKED) Then
$footer = "For Approval"
EndIf
If BitAND(GUICtrlRead($approved), $GUI_CHECKED) Then
$footer = "Approved"
EndIf
If BitAND(GUICtrlRead($fielduse), $GUI_CHECKED) Then
$footer = "Field Use"
EndIf
If BitAND(GUICtrlRead($revforapproval), $GUI_CHECKED) Then
$footer = "Revised For Approval"
EndIf
If BitAND(GUICtrlRead($revapproved), $GUI_CHECKED) Then
$footer = "Revised Approved"
EndIf
If BitAND(GUICtrlRead($revfielduse), $GUI_CHECKED) Then
$footer = "Revised Field Use"
EndIf
If BitAND(GUICtrlRead($none), $GUI_CHECKED) Then
$footeron = "0"
Else
$footeron = "1"
EndIf
If BitAND(GUICtrlRead($_8x11), $GUI_CHECKED) Then
$papername = "Letter"
$papersize = "1"
RegDelete($pdffactorykey & "\PrinterDriverData", "PaperHeight")
RegWrite($pdffactorykey & "\PrinterDriverData", "PaperWidth")
EndIf
If BitAND(GUICtrlRead($_11x17), $GUI_CHECKED) Then
$papername = "Tabloid"
$papersize = "3"
RegDelete($pdffactorykey & "\PrinterDriverData", "PaperHeight")
RegWrite($pdffactorykey & "\PrinterDriverData", "PaperWidth")
EndIf
If BitAND(GUICtrlRead($_24x36), $GUI_CHECKED) Then
$papername = "ARCH D"
$papersize = "280"
RegWrite($pdffactorykey & "\PrinterDriverData", "PaperHeight", "REG_DWORD", 9144)
RegWrite($pdffactorykey & "\PrinterDriverData", "PaperWidth", "REG_DWORD", 6096)
EndIf
EndFunc ;==>_radio

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; BUTTON FUNCTIONS ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

;FUNC EDIT
Func _edit()
$fileoption = "TIF (*.TIF)|PDF (*.pdf)|Images (*.tif;*.jpg;*.pdf)"
GUICtrlSetState($_24x36, $GUI_CHECKED)
$showdlg = 2
$sortorder = 0
_selected_files()
_sort()
_radio()
_regwrite()
GUICtrlSetData($progressbar, 0)
$incr = 1
While $incr <= $filecount
$n = $percent * $incr
GUICtrlSetData($progressbar, $n)
If $filecount = 1 Then
$filename = $array[1]
Else
$filename = $array[1] & "\" & $array[$incr + 1]
EndIf
$incr += 1
RunWait(@ComSpec & " /c " & $irfanexe & $filename & $printer, $irfandir, @SW_HIDE)
WinWaitClose("cmd.exe")
WEnd
Sleep(2000)
GUICtrlSetData($progressbar, 0)
$pid = FileMove($autosave, $folder & "\", 1)
WinWaitClose($pid)
$incr = 1
While $incr <= $filecount
If $filecount = 1 Then
$filename = $array[1]
Else
$filename = $array[1] & "\" & $array[$incr + 1]
EndIf
If $ext <> ".pdf" Then
$filename = StringTrimRight($filename, 3) & "pdf"
EndIf
$incr += 1
$pid = ShellExecute($filename, "", "", "open")
WinWaitClose($pid, 200)
Sleep(200)
WEnd
EndFunc ;==>_edit

;FUNC PRINT
Func _print()
GUICtrlSetState($none, $GUI_CHECKED)
$fileoption = "PDF (*.pdf)|TIF (*.TIF)|Images (*.tif;*.jpg;*.pdf)"
$showdlg = 1
$sortorder = 1
_selected_files()
_sort()
_radio()
_regwrite()
GUICtrlSetData($progressbar, 0)
$incr = 1
While $incr <= $filecount
$n = $percent * $incr
GUICtrlSetData($progressbar, $n)
If $filecount = 1 Then
$filename = $array[1]
Else
$filename = $array[1] & "\" & $array[$incr + 1]
EndIf
$incr += 1
RunWait(@ComSpec & " /c " & $irfanexe & $filename & $printer, $irfandir, @SW_HIDE)
WEnd
GUICtrlSetData($progressbar, 0)
EndFunc ;==>_print

;FUNC ROTATE
Func _rotateprints()
$fileoption = "TIF (*.TIF)|PDF (*.pdf)|Images (*.tif;*.jpg;*.pdf)"
GUICtrlSetState($_24x36, $GUI_CHECKED)
$sortorder = 1
_selected_files()
_sort()
IniWrite("C:\Program Files\IrfanView\i_view32.ini", "Batch", "AdvResize", 0)
If BitAND(GUICtrlRead($rotleft), $GUI_CHECKED) Then
$rotdirection = " /rotate_l /convert="
Else
$rotdirection = " /rotate_r /convert="
EndIf
GUICtrlSetData($progressbar, 0)
$incr = 1
While $incr <= $filecount
$n = $percent * $incr
GUICtrlSetData($progressbar, $n)
If $filecount = 1 Then
$filename = $array[1]
Else
$filename = $array[1] & "\" & $array[$incr + 1]
EndIf
$incr += 1
RunWait(@ComSpec & " /c " & $irfanexe & $filename & $rotdirection & $filename, $irfandir, @SW_HIDE)
WEnd
MsgBox(0, "", "Finished rotating dwgs")
GUICtrlSetData($progressbar, 0)
EndFunc ;==>_rotateprints

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; SUPPORTING FUNCTIONS ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

;FUNC FILES
Func _selected_files()
If $folder = "" Then
$folder = "::{20D04FE0-3AEA-1069-A2D8-08002B30309D}"
EndIf
$file = FileOpenDialog($selectmultiple, $folder, $fileoption, 1 + 4)
$array = StringSplit($file, "|")
$filecount = $array[0]
$folder = $array[1]
If $filecount = 1 Then
$len = StringLen($folder)
$trim = $len - StringInStr($folder, "\", 0, -1, $len)
$folder = StringTrimRight($folder, $trim)
$filename = $array[1]
$ext = StringTrimLeft($filename, StringLen($filename) - 3)
$percent = 100
Else
$filecount -= 1
$filename = $array[2]
$ext = StringTrimLeft($filename, StringLen($filename) - 3)
$percent = 100 / $filecount
EndIf
RegWrite($pdfthumb, "Application", "REG_SZ", "PDFXCview.exe")
RegWrite($pdfthumb, "Progid", "REG_SZ", "PDF-XChangeViewer.1")
EndFunc ;==>_selected_files

;FUNC HELP
Func _help()
MsgBox(0, "HELP", "ROTATE: Select LEFT or RIGHT and then
push ROTATE button to open file dialog and choose files to rotate"
& @CRLF & @CRLF & "CONVERT: If you need to add a footer,
dates or convert jpg or TIF files to pdf files then pick footer (or
select none) and click the CONVERT button to open the file dialoge
to choose prints. The program will add the footer and open the
drawings in PDF Xchange for editing. When you are finished editing
the drawings, exit out of PDF Xchange and hit enter to save each
file." & @CRLF & @CRLF & "PRINT: Choose size and then hit print
button. After PDF Factory has finished loading all of the drawings,
change the order if needed (plotter prints in reverse) and then click
the PDF Factory PRINT button and choose the printer to send it to.
Adjust the print size if needed." & @CRLF & @CRLF & "TIP: You can
choose multiple files in the file open dialog by using ctrl click or shift
click" & @CRLF & @CRLF & "TIP: Depending on the button pushed,
the file open dialog will show only either pdf or TIF files. You can
expand that choice to show either TIF, pdf or TIF & pdf & jpg files"
& @CRLF & @CRLF & "TIP: Plot Wizard will only print pdf, TIF or jpg
drawing files!" & @CRLF & @CRLF & "IF ALL ELSE FAILS GO ASK
JESSE!:)")
EndFunc ;==>_help

;FUNC INFO
Func _info()
MsgBox(0, "About", "Copyright (C) 2008 Jesse Whitehead" &
@CRLF & "This program is distributed under the terms of the GNU
General Public License" & @CRLF & "Click the license option to view
the terms and conditions" & @CRLF & "Source code is included in
the install directory")
EndFunc ;==>_info

;FUNC LICENSE
Func _license()
ShellExecute("C:\Program Files\Plot Wizard\gpl.txt")
EndFunc ;==>_license

;FUNC SORT
Func _sort()
If $filecount > 1 Then
_ArraySort($array, $sortorder, 2)
EndIf
EndFunc ;==>_sort

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; READ/WRITE OPERATIONS ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

;FUNC REGWRITE
Func _regwrite()
RegWrite($pdffactorykey, "StationeryName", "REG_SZ", $footer)
RegWrite($pdffactorykey, "UseStationery", "REG_DWORD", $footeron)
RegWrite($pdffactorykey & "\PrinterDriverData", "ShowDlg", "REG_DWORD", $showdlg)
RegWrite($pdffactorykey & "\PrinterDriverData", "Papername", "REG_SZ", $papername)
RegWrite($pdffactorykey & "\PrinterDriverData", "Papersize", "REG_DWORD", $papersize)
EndFunc ;==>_regwrite


Back to the OP. Hang in there, as stated, I was a script/code virgin until SL. If I can learn then anyone can. This one took a bit of work but now I find I even do off the cuff little bat files to simplify tasks all of the time now. There are no limits to the possibilites once you start you first "Hello World" script.
_____________________
I (who is a she not a he) reserve the right to exercise selective comprehension of the OP's question at anytime.
From: someone
I am still around, just no longer here. See you across the aisle. Hope LL burns in hell for archiving this forum
SuezanneC Baskerville
Forums Rock!
Join date: 22 Dec 2003
Posts: 14,229
07-29-2008 18:19
I'd find it useful if the popup help contents could get copied to the clipboard, with // in front, so they would stay where I can see them and possibly use them while writing the script.

To turn off the indentation, what a joy that would be.
_____________________
-

So long to these forums, the vBulletin forums that used to be at forums.secondlife.com. I will miss them.

I can be found on the web by searching for "SuezanneC Baskerville", or go to

http://www.google.com/profiles/suezanne

-

http://lindenlab.tribe.net/ created on 11/19/03.

Members: Ben, Catherine, Colin, Cory, Dan, Doug, Jim, Philip, Phoenix, Richard,
Robin, and Ryan

-
Osgeld Barmy
Registered User
Join date: 22 Mar 2005
Posts: 3,336
07-29-2008 18:22
i would have not said that if i only knew lsl :)

but even getting down to the core language, it mimics many popular languages, the father of that style i assume is C, but was that really needed for a general user base?

ie

if i wanted to add 2 numbers in LSL (not taking in account states, cause i totoally understand why they are there) it would involve many cryptic symbols that to joe noob seem quite confusing

CODE

integer total; // right away we have to hard define a variable are we 100% sure we need a integer?
maybe a float?, but what if i need to print it, instant extra layer of confusion

total = 2 + 2;

llOwnerSay((string) total); // drat now i have to typecast it, keep up with more ()'s


vs a simpler language, lets say lua
CODE

total = 0
total = 2 + 2
print(total)


ah, now theres no {} or ; to keep up with, and who cares what total is as a variable, we dont need to

it could be a string a float a integer ect ect ect

now im not saying lua is the best language in the world, i find it rather clunky, but it does serve as an example of a simpler scripting language, most find easier to pick up, hince why its used in systems like WOW

and i dont really find LSL difficult now, but in 2005 as a scripting virgin myself, just being able to add in some simple functionality became a real hassle, mainly keeping up with the formatting syntax, if i had no real interest in scripting, i would have not even bothered

i dont suggest replacing lsl with a block type system, but for anyone who wants to add some functionality to their creations, and not learn how to make a full blown OS in lsl i think it would be (is) a great (but limited) addition, just as being able to take a square texture and slap it on your av is a great, but limited way to make a shirt, without learning photoshop uv mapping or templates
Vlad Bjornson
Virtual Gardener
Join date: 11 Nov 2005
Posts: 650
07-29-2008 18:24
From: Jesse Barnett
Give LSLEditor a try, it already does most of what you need. Plus you can hit F1 on any entry to bring up the wiki entry and the lslint plugin will tell you any mistakes you have made.


Thanks for the tip, Jesse. Gonna check it out.

Just gave it a quick go though. Pretty darn slick. I'll definitely be using LSLeditor on my next scripting project. Love how it gives you tips and explanations as you are typing the commands.
_____________________
I heart shiny ! http://www.shiny-life.com
Cheewha Palen
Registered User
Join date: 27 Nov 2007
Posts: 78
07-29-2008 18:30
Hang in there!

I have been beating my head against the wall for over a year now fussing, begging, pleading with scripts to get them to do what I want. Then one day I realized, it is not "do what I want" its "how do you express this?" I have started on the road to doing scripts with some success and would hit a brick wall and have discovered that this THIS (point to all of you) is the best communal forum in the world.!

There are a lot of people here who will give genuine help and help you to see how it needs to be expressed. Like you I suck at syntax and one misplaced "{"" can ruin my day. But I see its possible.

A few nights ago I started a project and number of times I asked for help was ZERO! I did it all by myself and I cannot tell you how good that felt.

Stil much to learn and I bet any of the veterans will say the say....so again Hang in there!
Osgeld Barmy
Registered User
Join date: 22 Mar 2005
Posts: 3,336
07-29-2008 18:32
From: SuezanneC Baskerville
I'd find it useful if the popup help contents could get copied to the clipboard, with // in front, so they would stay where I can see them and possibly use them while writing the script.


oh so many times i wish i could click that box and plop it in my script, comments or not

From: SuezanneC Baskerville

To turn off the indentation, what a joy that would be.


and yes, omg yes, i guess it could be handy but it always adds a tab when i dont want it to, or bumps a line back before i want it too, maybe its becuase i write in blocks vs C style tho
Lucias Carnell
Registered User
Join date: 10 Feb 2007
Posts: 11
07-29-2008 21:01
Google "Scratch For Second Life"
or go to http://web.mit.edu/~eric_r/Public/S4SL/

its exactly what your after ;)
SuezanneC Baskerville
Forums Rock!
Join date: 22 Dec 2003
Posts: 14,229
07-29-2008 22:13
There should be a "no music" option for the video.
_____________________
-

So long to these forums, the vBulletin forums that used to be at forums.secondlife.com. I will miss them.

I can be found on the web by searching for "SuezanneC Baskerville", or go to

http://www.google.com/profiles/suezanne

-

http://lindenlab.tribe.net/ created on 11/19/03.

Members: Ben, Catherine, Colin, Cory, Dan, Doug, Jim, Philip, Phoenix, Richard,
Robin, and Ryan

-
DancesWithRobots Soyer
Registered User
Join date: 7 Apr 2006
Posts: 701
07-30-2008 06:52
For Yumi: Yep, that was it. David Crane's Game Maker, which I ran on a Commodore 64. I remember going to a local department store to buy a copy and was told by a clerk, who apparently didn't hear me "The video game industry is dead now." There was an NES in the showcase behind him, complete with ROB.

I remember when I looked at it, (DC's GM) having an "aha!" moment--This is BASIC made easy. I used it, because it's a perfect example of what I'm talking about.

I HAVE managed to do a little scripting. I can take relatively simple scripts and change the timing or the start event. I've painfully worked my way through well commented particle scripts to get a particular shape I needed. But some of those wiki and portal pages leave me asking more questions than I started with.

I probably don't even need exactly what I'm talking about. But there are a few people out there who take one look at lsl and. . .well, ok--Some people won't even try building. I guess you can't make some things simple enough for everyone.

Oh, and in my original post, I mentioned that I HAVE seen S4LSL. (I've been playing with the original Scratch with my niece.) Problem is that when I duplicated the default script in just a few blocks, I got something that DID work--But it added a LOT of stuff that had nothing to do with what I was doing. But it IS a step in the right direction.

I'm going to try some of the solutions you folks mentioned, tho, my eyes aren't what they used to be and sometimes peering into those little editing windows (not lsl's fault, I know) makes them itch.

Anyway, thanks for all of your answers, and for treating my post as a valid one and not making me feel too stupid.
_____________________
"Two lives I have.
One life I live. One life I dream.
In dreams I remember the better in me."
Vlad Bjornson
Virtual Gardener
Join date: 11 Nov 2005
Posts: 650
07-30-2008 09:27
From: DancesWithRobots Soyer
I'm going to try some of the solutions you folks mentioned, tho, my eyes aren't what they used to be and sometimes peering into those little editing windows (not lsl's fault, I know) makes them itch


LSLEditor has options to change the font size, so at least you could stare into little windows with large, bold text. :)
_____________________
I heart shiny ! http://www.shiny-life.com
Osgeld Barmy
Registered User
Join date: 22 Mar 2005
Posts: 3,336
07-30-2008 10:54
so does the inworld script window
Darien Caldwell
Registered User
Join date: 12 Oct 2006
Posts: 3,127
07-30-2008 12:03
From: Osgeld Barmy
so does the inworld script window


I've never seen an option to change the script window font size. How is that accomplished? editing some obscure XML file i presume?
_____________________
Osgeld Barmy
Registered User
Join date: 22 Mar 2005
Posts: 3,336
07-30-2008 21:21
its in the debug menu, id tell you but then i would have to kill you

jk

seriously id love to tell you right here and now, but my video card took a dump on me earlier this week and its off on a whirlwind trip, why does my broken crap get to take a trip and i dont? good question too!

so until i figure out why my geforce2 gts wont work with the legacy linux drivers ill just leave you with this thread

/54/53/180007/1.html

as you can see it never made it as a sticky, eventho it COMES UP EVERY 4 MONTHS, and my attached example image is all buggered up now
DancesWithRobots Soyer
Registered User
Join date: 7 Apr 2006
Posts: 701
07-31-2008 09:09
Yeah, I found the debug text sizes long ago, and now I can finally read things like my inventory. But there are "fit and finish" issues after having bumped up the font sizes a bit. I guess I could probably fix it by adjusting window sizes or something, but it's too much trouble.

LSL Editor is nice and easy to read and has some neat features. Might be just the thing.
_____________________
"Two lives I have.
One life I live. One life I dream.
In dreams I remember the better in me."
Darien Caldwell
Registered User
Join date: 12 Oct 2006
Posts: 3,127
07-31-2008 12:13
From: Osgeld Barmy
its in the debug menu, id tell you but then i would have to kill you

jk

seriously id love to tell you right here and now, but my video card took a dump on me earlier this week and its off on a whirlwind trip, why does my broken crap get to take a trip and i dont? good question too!

so until i figure out why my geforce2 gts wont work with the legacy linux drivers ill just leave you with this thread

/54/53/180007/1.html

as you can see it never made it as a sticky, eventho it COMES UP EVERY 4 MONTHS, and my attached example image is all buggered up now


Thanks, That at least points me in the right direction. :)
_____________________