View Full Version : Need AMS60CodeViewer.exe! :-D
Intrigued
08-21-2005, 12:43 AM
I really like the AMS50CodeViewer.exe app.
When the dust clears from AMS 6... maybe we will get to see:
AMS60CodeViewer.exe
?
:yes
csd214
08-21-2005, 04:09 AM
Hi Intrigued;
I second that.
Do you remember what Brett whispered? (http://www.indigorose.com/forums/showpost.php?p=32220&postcount=12)
“It would actually be quite easy to make a cooler one using AMS50 and the XML plugin. The AMS50 project files are just XML and parsing them for their script would be quite easy... just a weekend project fro some of you AMS junkies...”
I should really like to have a Code Viewer for all the 4 IR products!
You are an experienced user, Intrigued. Just a weekend project...
Intrigued
08-21-2005, 10:17 AM
:D
Well...
TJ_Tigger
08-21-2005, 10:42 AM
Isn't that what Desmond did here (http://www.indigorose.com/forums/showthread.php?t=11848&highlight=desmond). It allows you to open ams5 and vp2 project files and parses them.
Tigg
csd214
08-21-2005, 11:36 AM
Isn't that what Desmond did here (http://www.indigorose.com/forums/showthread.php?t=11848&highlight=desmond). It allows you to open ams5 and vp2 project files and parses them.
Tigg
No, it isn’t. I asked him in the referenced thread (http://www.indigorose.com/forums/showpost.php?p=57743&postcount=2).
Intrigued said "Well"; what about you, Tigg?
TJ_Tigger
08-21-2005, 11:47 AM
No, it isn’t. I asked him in the referenced thread (http://www.indigorose.com/forums/showpost.php?p=57743&postcount=2).
Intrigued said "Well"; what about you, Tigg?
What is it that you want it to do? The code Viewer is pretty straightforward. If all you want is to see the code and be able to save to a text file I can do that. Nice thing about AMS6 is the XML stuff is built right in. I will see if I can whip something up tonight.
Tigg
csd214
08-21-2005, 02:49 PM
… to see the code and be able to save to a text file …
YES; “only” that!
In the previous post (http://www.indigorose.com/forums/showthread.php?t=5549) yosik proposed “Would it be possible (Brett) to add a feature which allows to choose the text editor? Notepad has NO color coding or ident etc.....”
(Edit2Plus with the Lua_IR template uses the ”correct” syntax color.)
And kcs ” I'm not seeing the 'On startup' and 'On shutdown' project level scripts ...”
Additionally some housekeeping; “Delete all the scr*.txt and scr*.tmp files in the Temp dir.”
Thanks Tigg (if you have the time). :p
Intrigued
08-21-2005, 08:34 PM
We need Brett though to work on the CodeViewer as he needs to setup the AMS 6 filter too? Or am I missing something here?
TJ_Tigger
08-22-2005, 12:27 AM
Here is a quick project I threw together. It parses the file and throws the text into an input box. There are several things that do not work as of yet, like the menubar and the Save/Text Editor/Close buttons. I will try to do some more work on it when I find time this week.
Tigg
csd214
08-22-2005, 04:54 AM
See attachment. :) :yes
This is a marvellous learning project; “How to be a friend of XML”. Nice to have access to the source code.
For sure; later on I’ll try to extend the app to recognize .sf7 (and .vp2, .tu2).
Intrigued
08-22-2005, 09:35 AM
From the screen shot that looks pretty good-to-go.
:yes
TJ_Tigger
08-22-2005, 10:37 AM
Here is an update. It does a little more than before. All the buttons now work except for the show line numbers. It would be nice to have items be persistant when you close and reopen the project, but they are not as of yet. The menu bar now works except for the selection of a text editor. Still only works for .am6 files, if people want to send or post files from other IR applications I can see about adding code to open them as well.
There is a lot of potential in how one could build this application.
Tigg
TJ_Tigger
08-22-2005, 10:39 AM
Oh, and I forgot to mention that the page will resize for you as well. The buttons and input objects will reposition/resize as you change the dimensions of the page.
TJ_Tigger
08-22-2005, 11:37 AM
Ok, the project now supports line numbers in the view. The line number code is horrible so don't laugh too hard when you view it, but it works. Enjoy.
Tigg
TJ_Tigger
08-22-2005, 01:10 PM
Made items persistant, like last selected directory, last viewed file and the text editor selection (Edit->Text Editor) works as well. The persistance of the app uses the Application.SaveValue and Application.LoadValue to store these values. There are lines in the On Shutdown event that empty the strings if you want to enable them.
I also tweaked the numbering function so it would not duplicate linebreaks like it was tending to do and I added some error checking as well.
Tigg
Intrigued
08-22-2005, 01:19 PM
Made items persistant, like last selected directory, last viewed file and the text editor selection (Edit->Text Editor) works as well. The persistance of the app uses the Application.SaveValue and Application.LoadValue to store these values. There are lines in the On Shutdown event that empty the strings if you want to enable them.
I also tweaked the numbering function so it would not duplicate linebreaks like it was tending to do and I added some error checking as well.
Tigg
Class act TJ!
*bows before the power of TJ*
;)
csd214
08-22-2005, 02:11 PM
Fabulous! :yes :yes :yes :yes :yes
Opens with selected text editor. 10 points. (And if the extension is changed to .lua I don’t even need to change the document type (in EditPlus2) to ‘Lua_IR’)
Demonstrates the use of new features in AMS6 (menu, resizable window) . Look’n learn.
Despite the new ‘Script Explorer’ (which is great) Tigg’s app will be handy when you want all of the actions in one single file. And you can have a printout from your favourite text editor.
My conscience is suffering; I asked Tigg to create this app… I hope a lot you fellow members will download this project and learn what a nice utility this is (based on Brett’s idea with AMS5CodeViewer; a Columbus Egg).
TJ_Tigger
08-22-2005, 08:31 PM
Here is another little project that is kind of cool. I use this to open different projects and see the structure of the XML so I can see the structure of the file. It should work for any of the IR product files.
Tigg
TJ_Tigger
08-23-2005, 09:30 AM
Ok, I think I am done playing with this file. It now supports .am5, .am6, .sf7, .tu2, .vp2 files. Let me know if it does not parse them the way you expected.
Tigg
Intrigued
08-23-2005, 09:51 AM
Cool! I'll have to check this out after my trip today.
Thanks TJ-TIGGER.
:yes
Eagle
08-23-2005, 10:03 AM
Cool.. TKS TIGG :)
csd214
08-23-2005, 11:12 AM
My first usage of this app was to load AMS6 CodeViewer.am6, find were “src.txt” was hard coded. Entered the Script Explorer, modified the filename to “src.lua” (tailor made for EditPlus2/Lua_IR).
How can I thank you, Tigg? I was somewhat cheeky when I asked “what about you, Tigg?” (On Sunday). Today; Tuesday; I have an extraordinary handy tool. My only excuse is that this tool will be appreciated by a huge number of IR product users.
There is one BUG. The app name should be “IR Code Viewer”.
I’ll test your product thoroughly and report back. Later! I’m not that effective as you are…
Full score! :yes :yes :yes :yes :yes
TJ_Tigger
08-24-2005, 02:54 PM
Ok so I lied. I was playing a little more with the app and menus. I added the capability to record up to the last four opened files. The code is a kludge. But then again it works. Have fun with it.
Intrigued
08-24-2005, 07:30 PM
Ok so I lied. I was playing a little more with the app and menus. I added the capability to record up to the last four opened files. The code is a kludge. But then again it works. Have fun with it.
Cool! I'm looking at the ability to have this project remember the size dimensions (width/height) upon the next startup.
Thanks again for taking time to build this app. I like how you can handle XML/AMS situations!
:yes
*Heck, let me add... this should really be the first user created (read: example) AMS 6 app. for the (to be?) AMS 6 Examples forum section!*
TJ_Tigger
08-24-2005, 09:17 PM
Cool! I'm looking at the ability to have this project remember the size dimensions (width/height) upon the next startup.
That is a good idea. I would add to the on Shutdown a couple lines to get the size and store them to values. I used the Application.SaveValue("Settings", ... fill in the rest, yada yada yada). Then if those registry values have value on startup then apply them to the window. :D
And thanks. The code could be streamlined. I was just trying to bang it out.
csd214
08-25-2005, 01:28 AM
I was just trying to bang it out.
You are too modest. And you haven’t even added your signature to the file properties. I should like to see your nice tiger logo decorate this app.
In your first release the My Documents folder was used as default browse folder. That’s the default project folder for all four products but I’m sure several of us have changed that to suite our needs. I thought of a product selection object to be used before clicking Browse/File Open (radio buttons/check boxes/combo box to select file type). In this way the proper project folder could be opened directly.
Now you have introduced the Registry value “LastDir” when opening a project. In my case that has eliminated the need of the project folder option (all my project folders are subfolder to the same parent folder).
Just a little warning; you use the Registry key ACData\Settings. This might cause conflicts with other AMS apps using the Application.SaveValue() command. Couldn’t it be wise to have a product identifier key (like Section = "IR Product CodeViewer\\Settings")? (Thanks for fixing the “BUG”!!)
Attention the IR team
From previous post in the AMS forum I can see that Brett’s AMS5CodeViewer.exe obviously was popular. For more than a year I have felt the loss of a similar utility when working with Setup Factory. Now there is an offer to all users of your products.
IMHO Tigg’s IR Product CodeViewer.exe in some way should be available to ALL users of the IR products after the AMS6 Beta Discussion Forum is removed. (That’s marketing of AMS to SUF/VP/TU users.)
And WITH the tiger logo! :yes
yosik
08-25-2005, 02:45 AM
I second that suggestion.
You did a great job, Tigg and you deserve the FULL credit for that!!!
Yossi
Corey
08-25-2005, 02:58 AM
If anyone deserves a big batch 'o credit it's definitely El Tigre. :yes
TJ_Tigger
08-25-2005, 09:09 AM
in my best Goofy voice Goorrsh!
It was fun.
Tigg
TJ_Tigger
08-25-2005, 01:23 PM
Ok, another copy to play with. Here is what I have done.
- Added Edit -> Text File - which allows you to configure the default textfile output name. so you can change this to src.lua if you want.
- Added persistance with windowsize, windowposition, Show Empty fields, and Show Line numbers
- Changed refresh button to have a popup menu so you can choose to refresh the main input either from a text file or the project. The Default is to refresh the input from the project file.
- Changed all registry references to be "IR Product CodeViewer\\Settings\\whatever"
- and a few other things, can't remember all the changes.
Lunch is over back to work.
Tigg
Intrigued
08-25-2005, 02:46 PM
TJ-TIGGER... well... rock... and you.. = YOU ROCK!
;)
Someone needs to hire you YESTERDAY for an AMS position in their company, at top dollar! Because I really like your do it HOY Y NO MAÑANA (do it today and not tomorrow) attitude when approaching something.
:yes ... and ... Schlitcazapppz ... :yes
Intrigued
08-25-2005, 03:13 PM
Bug, it looks like your Recent Files... (under the File menu item) done did got broke somehow, FYI.
:huh
csd214
08-25-2005, 03:13 PM
HOY Y NO MAÑANA; no, it’s indeed not applicable in this case.
But where is the Tiger image? It seems I have to add it myself. I had several (from another downloaded project) but where are they today?
TJ_Tigger
08-25-2005, 03:38 PM
Bug, it looks like your Recent Files... (under the File menu item) done did got broke somehow, FYI.
:huh
It still works here. I did not copy the old reg settings over to the new settings so they are not carried over, but if you open a new file it should be added to the recent files list. Let me know if it does not work.
Tigg
TJ_Tigger
08-25-2005, 03:46 PM
HOY Y NO MAÑANA; no, it’s indeed not applicable in this case.
But where is the Tiger image? It seems I have to add it myself. I had several (from another downloaded project) but where are they today?
Yeah there was not really room for the classic TiggerWare image, but it has the classic Tigg coloring. :D
Intrigued
08-25-2005, 03:50 PM
It still works here. I did not copy the old reg settings over to the new settings so they are not carried over, but if you open a new file it should be added to the recent files list. Let me know if it does not work.
Tigg
Ah, okay... that there fixed me sity-washun right up.
;)
Brett
08-25-2005, 03:56 PM
Just took a look at the project - good work Tigger. One neat addition would be if you would put a special tag in the comment of each event that would tell the program where it came from. Then, make it so that I can save the code back to my .am6 file. :lol
This way you could open it, edit it and then save it back to the XML from whence it came.
TJ_Tigger
08-25-2005, 03:58 PM
Just took a look at the project - good work Tigger. One neat addition would be if you would put a special tag in the comment of each event that would tell the program where it came from. Then, make it so that I can save the code back to my .am6 file. :lol
This way you could open it, edit it and then save it back to the XML from whence it came.
Funny you should say that . . .
Brett
08-25-2005, 04:04 PM
The only other suggestion that I have is that you use a monospace font like Courier New. In general, source code editors use monospaced fonts as it makes it easier to read the code.
Here is another "challenge" project for someone:
Make an AMS60 app where I can paste in script and then have it format the script in HTML or vBulliten markup codes. That is, I enter:
-- Hello
Dialog.Message("Hello", "World");
Then click "Generate BBS Code" and I get something that I can paste into a forum message and it looks like this:
-- Hello
Dialog.Message("Hello", "World");
And then has another button to export to HTML code. Now that would be useful!
csd214
08-25-2005, 04:21 PM
“Recent files”; I had some problems but I had added the new key before the program knew about it. I deleted both “Settings” keys and it seems to work as expected.
“Tag in the comment”, “HTML or vBulliten markup codes”, “export to HTML”. Now it has to be MANANA; even to Tigg. :o
TJ_Tigger
08-26-2005, 02:44 PM
Ok Brett, I added the functionality you had requested to the software. You can now select text in the input and right-click to generate BBS or HTML code. these options are available from the File->Export menu option as well. The formatted text is copied to the clipboard, so you could explore the code of a file, highlight the part you want, right-click generate BBS code and then paste that code into the IR forums. :D
The HTML does not do much aside from replacing some strings with other strings. I am sure there is a lot more that could be done to better format the code for HTML.
And for CSD214, I added my TiggerWare image as a splashimage, which you can click past.
Tigg
Corey
08-26-2005, 03:04 PM
TiggerWare
Ee-hee-hee-hee-hee-hee. :yes
Intrigued
08-26-2005, 05:12 PM
Uhm.... *looks at 'Tiggs pant leg*... you're on fire.
:)
csd214
08-27-2005, 04:05 AM
a cloudy day in Tigg's brain
Can’t be true! Another superb version of the Code Viewer.
When I read your question about the Dialog.SplashImage I had mine suspicions… Thanks for the TigerWare splash; it will forever remind me of the Sunday in August when I innocently asked “What about you, Tigg?”
The VB trick to override the built in right-click menu; what a handy feature!
To be honest I didn’t quite understand what Brett meant with his vBulletin and HTML suggestion but now I follow you. To have success with the HTML code I had to change the sequence of the command lines.
-- replace special characters
strSelected = String.Replace(strSelected, ">", ">", false);
strSelected = String.Replace(strSelected, "<", "<", false);
strSelected = String.Replace(strSelected, "&", "&", false);
strSelected = String.Replace(strSelected, "\"", """, false);
strSelected = String.Replace(strSelected, "'", "'", false);
strSelected = String.Replace(strSelected, "\r\n", "<br>", false);
-- and then the paragraph tag
strSelected = "<p>"..strSelected.."</p>";
Now I used the feature!
Are you going to implement the function “write modified code back to project file”? Personally I should prefer to switch back to AMS (Alt-TAB) to modify the code (Shift-F12 = Script Explorer). I’m too dependent of the Action Wizard, the intellisense feature and the syntax checker. I’m still not able to type the commands directly with the speed Corey demonstrates in the Speedy Training CDs. :rolleyes
Corey
08-27-2005, 04:19 AM
Hee. Each of those lessons took multiple takes and the CDs include the best of those. You don't get to see all the mistakes I made along the way. :)
I'm working on the new 6.0 video training stuff now. It will be a much different format. More watchable I think. Last time I made the lessons sort of as a video version of the docs but this time it's much more freeform, almost like what you would expect from a classroom or seminar. I think this might result in much easier learning. With this new, more watchable format we're also dropping the shipped CDs (going to ESD only) so we can bring the prices down even further. Enough with all those crazy shipping costs, they're out of hand. We'll include a license which permits you to legally burn two copies for your own use, so if having a physical CD is important you can just burn your download. The modules will be more focused, more watchable, and more affordable. :yes
And the side benefit of the new format is that I will be free now to put out lots of modules on different topics fairly quickly. The problem with the old CDs is that they are a huge task to create, and 3rd party version upgrades are unpredictable. For example if I had put out my Photoshop CDs when I planned, it would have been just in time for the new version, thereby making them instantly obsolete. I'm glad I never got those done because of that. Anyhow more to come on the new training soon, nothing is official yet. Suffice to say I haven't forgotten about you guys, new and improved things are brewing. :yes
TJ_Tigger
08-27-2005, 09:30 AM
To be honest I didn’t quite understand what Brett meant with his vBulletin and HTML suggestion but now I follow you. To have success with the HTML code I had to change the sequence of the command lines.
Yeah, I had not tested the HTML much when I put that information into the project. I modified the code in the project to contain the changes you had made and changed moved the code to a function since it is used in a couple of places. One update changes both. Here is the function code, this was generated by the IRPCV app.
--################################
--## Generate HTML Code
--################################
function GenerateHTMLCode(sSelected)
sSelected = String.Replace(sSelected, "&", "&", false);
sSelected = String.Replace(sSelected, "\"", """, false);
sSelected = String.Replace(sSelected, "'", "'", false);
sSelected = String.Replace(sSelected, ">", ">", false);
sSelected = String.Replace(sSelected, "<", "<", false);
sSelected = String.Replace(sSelected, "\r\n", "<br>", false);
--Add Paragraph tags
sSelected = "<p>"..sSelected.."</p>"
return sSelected;
end
Are you going to implement the function “write modified code back to project file”? Personally I should prefer to switch back to AMS (Alt-TAB) to modify the code (Shift-F12 = Script Explorer). I’m too dependent of the Action Wizard, the intellisense feature and the syntax checker.
I have been looking into this just a little bit. It requires that
one keep track of each block of data -- store data in a table
where it originated in the project file -- index the table with the path of the data in the XML file
check for differences between the original and the current copy -- compare strings
repopulate the project file with the new information -- use xml to replace the contents of the file with the new material
error checking and a few other things.
So with that list, it would require a rewrite of the code to store the data differently, shouldn't take too much, but more than I have right now. :D
Tigg
csd214
08-27-2005, 11:54 AM
So with that list, it would require a rewrite of the code to store the data differently, shouldn't take too much, but more than I have right now.
I can imagine this has to be “some work”. The intention with my question was to tell that personally I don’t find the mentioned feature essential. It is simple to switch to AMS (two keystrokes or minimizing the window) and I need the action wizard. Especially with the new script explorer is an easy task to find the appropriate code section.
I’m 110%; at least; satisfied with the project in its present form.
vBulletin® v3.8.4, Copyright ©2000-2009, Jelsoft Enterprises Ltd.