Photo Gallery Member List Search Calendars FAQ Ticket List Log Out


[Update v0.4] Image plus Text Viewer (HTA)

 
Logged in as: Guest
arrSession:exec spGetSession 2,16,39889
 Active Users: There are 0 members and 0 guests.
 Users viewing this topic: none
 

 

 
  
  Printable Version
All Forums >> [Scripting] >> Post a VBScript >> [Update v0.4] Image plus Text Viewer (HTA)
  Do you like VisualBasicScript.com? Link to us and help spread the word about our forum. Thanks!
Page: [1]
Login
Message << Older Topic   Newer Topic >>
 [Update v0.4] Image plus Text Viewer (HTA) - 11/18/2006 8:52:11 AM   
  Fredledingue


Posts: 321
Score: 0
Joined: 5/9/2005
From:
Status: offline
NO JS!

FEATURES:
-A very simple picture viewer displaying at the same time as a text refering to this picture.
-Texts can be short comments or long descriptions, stories, jokes, etc that you write yourself in notepad
-Supports only picture formats supported by Internet Explorer
_______________________________
Mouse over *Show Toolbar* : Shows the following  BUTTONS:
Mouse over *Hide Toolbar* : Erases  them:
.
[Edit Text]: Create or edit the text for the image
[Zoom in]: Enlarge the image by 1/3
[Zoom out]: Reduce the image by 1/3
[100%]: Display the image back to its original size
[Open]: Return to the list of files and folders
[<--]: Display the previous image in the same folder
[-->]: Display the next image in the same folder
[_]: Minimize ==> [_-]: Maximize
[X]: Exit
.
CHECK BOXES
From left to right:
1: Display file name and file infos on/off
2: Display text on/off
3: Display text on black/transparent background when overlaping the image (*)
*: The text appears on the right of the picture unless there is no room left for it. When the image cover all the screen, the text is displayed on the picture.
_______________________________
KNOWN BUGS AND LIMITATIONS:
-You can't modify the size of the window: It's either maximized or "reduced".
-You can't realy minimize it. The minimize button will reduce it on a small area in the right bottom of the screen.
-No context menu on the task bar.
-Huge zoom may not display.
-Huge images may take a few seconds to display.



      

< Message edited by Fredledingue -- 11/22/2006 9:25:08 AM >


_____________________________

Fred
 
 
Revisions: 4 | Post #: 1
 
 RE: Image plus Text Viewer (HTA) - 11/18/2006 9:28:38 PM   
  TNO


Posts: 1036
Score: 10
Joined: 12/18/2004
From: thenewobjective.com
Status: offline
Not a bad idea, but the user friendliness is pretty limited for the things you mentioned.
quote:


-You can't modify the size of the window: It's either maximized or "reduced".
-You can't realy minimize it. The minimize button will reduce it on a small area in the right bottom of the screen.
-No context menu on the task bar. 


For these bugs, why don't you just delete this part of your code to fix it?

BORDER="none"

With that you can also eliminate your 2 buttons (and related functions) for close and minimize. A program like this that goes fullscreen could easily irritate the user (unless it was a game or something like that where they would expect it).

Suggestions:
  1. Use fullscreen when the user clicks on an image
  2. put all the picture comment textfiles in one spot so they arent scattered all over the hard drive
  3. For your list of picture files, make it so the mouse-cursor becomes a hand when you hover on it

And finally, could you include openfolblack.gif here on the board so we could see what the program looks like with it?

_____________________________

Consolidated Script Component: The Acid Test

A universe of complexity...

(in reply to Fredledingue)
 
 
Post #: 2
 
 RE: Image plus Text Viewer (HTA) - 11/19/2006 6:00:24 AM   
  Fredledingue


Posts: 321
Score: 0
Joined: 5/9/2005
From:
Status: offline
Thanks for your suggestiong TNO.

Do you know how to do suggestions 1 and 3?
1: How to switch to real full screen from a bordered window and vice versa.
3: How to change the mouse cursor while hovering

For suggestion 2: There are pro and cons.
First they are not scattered all over the place: they are where the pictures are and if you sort the files by name they will be next to each others.
I was thinking to put all the comments in one file per folder (comments.txt for example)
But that could complicate the search, editing or deletion of these comments with possible performance hit. The same with storing all the file in a single folder.
One singel file per folder is good for small comments (like 30 words each). It's less good for long comments like 500 words each. It depends what you want to do.
Maybe I will add some code to find both image-specific text file and comment.txt if it exists.
This way the user can choose to store the comments in a single files or in multiple file.

Here is the "open  folder" 'icon'.


Thumbnail Image


Attachment (1)

< Message edited by Fredledingue -- 11/19/2006 6:11:16 AM >


_____________________________

Fred

(in reply to TNO)
 
 
Revisions: 4 | Post #: 3
 
 RE: Image plus Text Viewer (HTA) - 11/19/2006 6:08:25 AM   
  Fredledingue


Posts: 321
Score: 0
Joined: 5/9/2005
From:
Status: offline
Here is the complete "readme" file.

Attachment (1)

_____________________________

Fred

(in reply to Fredledingue)
 
 
Post #: 4
 
 RE: Image plus Text Viewer (HTA) - 11/19/2006 8:38:21 PM   
  TNO


Posts: 1036
Score: 10
Joined: 12/18/2004
From: thenewobjective.com
Status: offline
heres the fullscreen method:

document.open(sUrl [, sName] [, sFeatures] [, bReplace])


example:
document.open('about:blank','win1','fullscreen=yes')

There a few ways to change the cursor, but I think the best way for your program would be like this:

<span onmouseover="this.style.cursor='hand'" onmouseout="this.style.cursor='auto'">blah</span>

For suggeston 2.....You culd always try an XML file:


      

_____________________________

Consolidated Script Component: The Acid Test

A universe of complexity...

(in reply to Fredledingue)
 
 
Revisions: 1 | Post #: 5
 
 RE: Image plus Text Viewer (HTA) - 11/21/2006 7:52:35 AM   
  Fredledingue


Posts: 321
Score: 0
Joined: 5/9/2005
From:
Status: offline
I have added the onmouseover cursor style.

quote:

ORIGINAL: TNO
There a few ways to change the cursor, but I think the best way for your program would be like this:

<span onmouseover="this.style.cursor='hand'" onmouseout="this.style.cursor='auto'">blah</span>




This:
quote:


heres the fullscreen method:

document.open(sUrl [, sName] [, sFeatures] [, bReplace])
 
example:
document.open('about:blank','win1','fullscreen=yes')


...doesn't work for hta applications.

The only way is to create two hta's, one opening in full screen, the other one in normal screen.
Then switching from one to the other. That requires closing the application and opening the other one with the same parameters.

I'v tried resizing and repositioning off the screen. That works for repositioning, not for resizing.
Top and left borders disapear, not right and bottom borders and the taskbar is always visible.

There is realy poor window view management in hta...

quote:


For suggeston 2.....You culd always try an XML file:


Maybe I will study XML in the future...

_____________________________

Fred

(in reply to TNO)
 
 
Post #: 6
 
 RE: Image plus Text Viewer (HTA) - 11/21/2006 6:03:01 PM   
  TNO


Posts: 1036
Score: 10
Joined: 12/18/2004
From: thenewobjective.com
Status: offline
Fullscreen does work:

Example:


      

_____________________________

Consolidated Script Component: The Acid Test

A universe of complexity...

(in reply to Fredledingue)
 
 
Post #: 7
 
 RE: Image plus Text Viewer (HTA) - 11/22/2006 2:46:45 AM   
  Fredledingue


Posts: 321
Score: 0
Joined: 5/9/2005
From:
Status: offline
That code open a new blank IE window in full screen. It doesn't resize the hta window.
Moreover if you try to open an hta application with this method, you will be warned that it can damage your computer, then prompted to save it on your hard drive.

_____________________________

Fred

(in reply to TNO)
 
 
Post #: 8
 
 RE: Image plus Text Viewer (HTA) - 11/22/2006 5:05:54 AM   
  TNO


Posts: 1036
Score: 10
Joined: 12/18/2004
From: thenewobjective.com
Status: offline
oooooh.....I didin't know you wanted to toggle the current window. I was thinking of making the image display portion open in a fullscreen mode. The window attributes of an HTA are readonly defined at startup, so as a work-around  guess you could document.write() the html of your HTA into the fullscreen pop-up window, then make it close when the window loses focus, hence giving the illusion of toggling modes.




While trying to figure this out I came across this interesting piece of HTA ingenuity:


      



_____________________________

Consolidated Script Component: The Acid Test

A universe of complexity...

(in reply to Fredledingue)
 
 
Post #: 9
 
 RE: Image plus Text Viewer (HTA) - 11/22/2006 9:18:33 AM   
  Fredledingue


Posts: 321
Score: 0
Joined: 5/9/2005
From:
Status: offline
quote:

ORIGINAL: TNO
I was thinking of making the image display portion open in a fullscreen mode.

Not a bad idea! I didn't think about that... I will try this solution.

quote:


The window attributes of an HTA are readonly defined at startup, so as a work-around  guess you could document.write() the html of your HTA into the fullscreen pop-up window, then make it close when the window loses focus, hence giving the illusion of toggling modes.

I'm not sure if it will work properly or efficiently because some script won't benefit from the hta security waiver.


While trying to figure this out I came across this interesting piece of HTA ingenuity:

Nice. There are many things to do!
______________________

UPDATES:

v0.4

-Added "onmouseover" toolbar
-Added keyboard hotkeys (press "?" to see them)

_____________________________

Fred

(in reply to TNO)
 
 
Post #: 10
 
 RE: Image plus Text Viewer (HTA) - 12/8/2006 8:35:11 PM   
  TNO


Posts: 1036
Score: 10
Joined: 12/18/2004
From: thenewobjective.com
Status: offline
Have you considered using this for your zoom method? This should allow even humongoid sizes to still be displayed

<img src="http://www.visualbasicscript.com/images/logo.gif" onmouseover="this.style.zoom='250%'" onmouseout="this.style.zoom='100%'">


And for the popup problem (lack of HTA privelages), use one of thes methods insead:

http://msdn.microsoft.com/workshop/author/dhtml/reference/methods/showmodaldialog.asp

http://msdn.microsoft.com/workshop/author/dhtml/reference/methods/showmodelessdialog.asp



_____________________________

Consolidated Script Component: The Acid Test

A universe of complexity...

(in reply to Fredledingue)
 
 
Post #: 11
 
 
 
  

If you found our site useful please link to us <a href="http://www.visualbasicscript.com">VisualBasicScript.com</a>.
All Forums >> [Scripting] >> Post a VBScript >> [Update v0.4] Image plus Text Viewer (HTA) Page: [1]
Jump to:





New Messages No New Messages
Hot Topic w/ New Messages Hot Topic w/o New Messages
Locked w/ New Messages Locked w/o New Messages
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts