| View previous topic :: View next topic |
| Author |
Message |
tim6389 Professional Member


Joined: 01 Aug 2002 Posts: 790
|
Posted: Fri Aug 02, 2002 7:06 pm Post subject: grrrrrrrr window and buttons....help |
|
|
well i have tied to get my butons to be on the bottom in gray..also try to get my buttons to work ( when i click on the button it will load other txt file from the web) my resize only works on the "main" window
i even tried to code button codes with other script out there and i still can't get it here is my code so far note: i took out the button varible cause it wasn't working at least the script runs with no eorrors | Code: | %%tempfile = @windir(T)
if @not(@equal(@strdel(@windir(T),1,-1),\))
%%tempfile = %%tempfile\
end
%%tempfile = %%tempfile"tim.tmp"
%%url = http://192.168.1.3/members/logger/log42.txt
%%username = xxxxx
%%password = xxxxx
rem %%interval is in seconds
%%interval = 1
directory change,c:\vds@path(%0)
external vdsipp.dll
internet http,create,1
internet http,threads,1,off
internet http,protocol,1,1
internet http,useragent,1,tim
internet http,authenticate,1,%%username,%%password
dialog CREATE,Textfile,-1,0,529,329,RESIZABLE
dialog ADD,STYLE,sFont,Courier New,8,,,
dialog ADD,LIST,lText,8,8,512,312,,sFont
rem DIALOG ADD,EDIT,lText,8,8,512,312,,MULTI,SFONT
dialog ADD,BUTTON,BUTTON1,102,0,64,24,BUTTON1
dialog ADD,BUTTON,BUTTON2,100,150,64,24,BUTTON2
dialog ADD,BUTTON,BUTTON3,136,0,64,24,BUTTON3
dialog ADD,BUTTON,BUTTON4,136,78,64,24,BUTTON4
dialog ADD,BUTTON,BUTTON5,100,76,64,24,BUTTON5
dialog ADD,BUTTON,BUTTON6,136,152,64,24,BUTTON6
dialog ADD,BUTTON,BUTTON7,100,228,64,24,BUTTON7
dialog ADD,BUTTON,BUTTON8,134,228,64,24,BUTTON8
dialog ADD,BUTTON,BUTTON9,100,312,64,24,BUTTON9
dialog ADD,BUTTON,BUTTON10,132,312,64,24,BUTTON10
dialog SHOW
%%dh = @sum(2,@dlgpos(SB,H))
rem goto timer
:evloop
wait event,%%interval
goto @event()
:RESIZE
PARSE "%H;%W",@dlgpos(,HW)
DIALOG SETPOS,ED,0,1,@diff(%W,2),@diff(%H,%%dh)
goto evloop
:BUTTON1BUTTON
goto timer
goto evloop
:timer
internet http,download,1,%%url,%%tempfile
list loadfile,lText,%%tempfile
goto evloop
:close
internet http,destroy,1
exit
|
|
|
| Back to top |
|
 |
SnarlingSheep Professional Member


Joined: 13 Mar 2001 Posts: 759 Location: Michigan
|
Posted: Fri Aug 02, 2002 7:21 pm Post subject: |
|
|
The elements in your dialog won't reposition themselves.
You have to add code into your :RESIZE Label to set things like buttons so far away from the top and right of the dialog.
I would actually suggest staying away from RESIZE until you are more familiar with VDS. Users don't always need to resize a dialog anyway. _________________ -Sheep
My pockets hurt... |
|
| Back to top |
|
 |
tim6389 Professional Member


Joined: 01 Aug 2002 Posts: 790
|
Posted: Fri Aug 02, 2002 7:34 pm Post subject: ok |
|
|
yea that resize not to good what about my button problem
how i fix that? and make it so the buttons work right...hehehehe |
|
| Back to top |
|
 |
SnarlingSheep Professional Member


Joined: 13 Mar 2001 Posts: 759 Location: Michigan
|
Posted: Fri Aug 02, 2002 7:40 pm Post subject: |
|
|
The best thing for you, would probably be to click on the Tools menu in VDS and click Application Wizard. That will let you add what you want, where you want it. It will also add labels for buttons you add automatically.
Then when you figure out how to do that, you can add in the code for using the vdsipp dll.
Familiarize your self with VDS a bit, then get into coding your program that checks your text file on your server.
We're all happy to help, but it's hard to explain things when you aren't familiar with VDS yet.
Good luck  _________________ -Sheep
My pockets hurt... |
|
| Back to top |
|
 |
tim6389 Professional Member


Joined: 01 Aug 2002 Posts: 790
|
Posted: Fri Aug 02, 2002 7:51 pm Post subject: yea |
|
|
yup
that is where i got some of the code from i will play it some more... |
|
| Back to top |
|
 |
SnarlingSheep Professional Member


Joined: 13 Mar 2001 Posts: 759 Location: Michigan
|
Posted: Fri Aug 02, 2002 8:06 pm Post subject: |
|
|
If you already have a dialog made, and would like to go back and edit it in the App. Wizard you can put the cursor in the DIALOG Create line of your code and hit your F2 key.
Example:
In your script click in "dialog CREATE,Textfile,-1,0,529,329" and hit F2.
Then you can click on your elements and resize, move or delete them.
So to get your buttons at the bottom you would click on your LIST element and resize it so it isn't so long, and then click on each button and move it below the list into the gray part.
Hope that helps a bit. _________________ -Sheep
My pockets hurt... |
|
| Back to top |
|
 |
tim6389 Professional Member


Joined: 01 Aug 2002 Posts: 790
|
Posted: Fri Aug 02, 2002 8:46 pm Post subject: ok good news and bad news |
|
|
ok goods new is i got it working BUT when i click on buton1 then click on button 2...button 2 works BUT after a sec or so the info in the box goes back to button1 by itself and i don't know why here is the code i have as of right now | Code: | %%tempfile = @windir(T)
if @not(@equal(@strdel(@windir(T),1,-1),\))
%%tempfile = %%tempfile\
end
%%tempfile = %%tempfile"vdsworld.tmp"
%%url = http://192.168.1.3/members/logger/log42.txt
%%username = xxx
%%password = xxx
%%tempfile1 = %%tempfile"vdsworld1.tmp"
%%url1 = http://192.168.1.3/members/logger/log1.txt
rem %%interval is in seconds
%%interval = 1
directory change,c:\vds@path(%0)
external vdsipp.dll
internet http,create,1
internet http,threads,1,off
internet http,protocol,1,1
internet http,useragent,1,VDSWORLD
internet http,authenticate,1,%%username,%%password
DIALOG CREATE,New Dialog,-1,0,484,298
dialog ADD,STYLE,sFont,Courier New,8,,,
DIALOG ADD,LIST,lTEXT,25,12,466,170,,sFont
DIALOG ADD,BUTTON,BUTTON1,210,14,64,24,button1
DIALOG ADD,BUTTON,BUTTON2,254,14,64,24,BUTTON2
DIALOG ADD,BUTTON,BUTTON3,210,96,64,24,BUTTON3
DIALOG ADD,BUTTON,BUTTON4,254,98,64,24,BUTTON4
DIALOG ADD,BUTTON,BUTTON5,212,182,64,24,BUTTON5
DIALOG ADD,BUTTON,BUTTON6,256,184,64,24,BUTTON6
DIALOG ADD,BUTTON,BUTTON7,210,262,64,24,BUTTON7
DIALOG ADD,BUTTON,BUTTON8,256,264,64,24,BUTTON8
DIALOG ADD,BUTTON,BUTTON9,210,346,64,24,BUTTON9
DIALOG ADD,BUTTON,BUTTON10,254,348,64,24,BUTTON10
DIALOG SHOW
%%dh = @sum(2,@dlgpos(SB,H))
rem goto timer
:evloop
wait event
goto @event()
:evloop1
wait event,%%interval
goto @event()
:BUTTON1BUTTON
internet http,download,1,%%url,%%tempfile
list loadfile,lText,%%tempfile
goto evloop1
:BUTTON2BUTTON
internet http,download,1,%%url1,%%tempfile1
list loadfile,lText,%%tempfile1
goto evloop1
:RESIZE
PARSE "%H;%W",@dlgpos(,HW)
DIALOG SETPOS,ED,0,1,@diff(%W,2),@diff(%H,%%dh)
goto evloop
rem :timer
rem internet http,download,1,%%url,%%tempfile
rem list loadfile,lText,%%tempfile
rem goto evloop1
:close
internet http,destroy,1
exit
|
so it acts like when you hit a buton it don't fully stop the calls..or something |
|
| Back to top |
|
 |
SnarlingSheep Professional Member


Joined: 13 Mar 2001 Posts: 759 Location: Michigan
|
Posted: Fri Aug 02, 2002 9:05 pm Post subject: |
|
|
Reposted below _________________ -Sheep
My pockets hurt...
Last edited by SnarlingSheep on Fri Aug 02, 2002 10:05 pm; edited 3 times in total |
|
| Back to top |
|
 |
tim6389 Professional Member


Joined: 01 Aug 2002 Posts: 790
|
Posted: Fri Aug 02, 2002 9:13 pm Post subject: i tried that code |
|
|
i tried that code BUT it don't refreash the info byitself...meaning when i selected a button that test window should re-freash the info byitself...only way i can get it to re-freash the info is to goto other button then come back to the one i want  |
|
| Back to top |
|
 |
SnarlingSheep Professional Member


Joined: 13 Mar 2001 Posts: 759 Location: Michigan
|
Posted: Fri Aug 02, 2002 9:18 pm Post subject: |
|
|
Ah, I forgot about that..
I updated my last post so it should work for you now. _________________ -Sheep
My pockets hurt... |
|
| Back to top |
|
 |
tim6389 Professional Member


Joined: 01 Aug 2002 Posts: 790
|
Posted: Fri Aug 02, 2002 9:28 pm Post subject: nope :( |
|
|
well it works BUT now i'am back to the same thing when i press the button 1 the go to button 3 after a sec or so the info in the box goes back to button 1  |
|
| Back to top |
|
 |
SnarlingSheep Professional Member


Joined: 13 Mar 2001 Posts: 759 Location: Michigan
|
Posted: Fri Aug 02, 2002 9:37 pm Post subject: |
|
|
You will have to add code for each button..
Like in the Timer Label add:
| Code: |
if @EQUAL(%%Button,3)
internet http,download,1,%%url2,%%tempfile2
list loadfile,lText,%%tempfile2
end
|
And in the Button3BUTTON Label add:
| Code: |
internet http,download,1,%%url2,%%tempfile2
list loadfile,lText,%%tempfile2
%%Button = 3
goto evloop
|
And of course %%tempfile2 and %%url2 should hold whatever 3rd Tempfile and URL you are using..if you are using 3rd ones.
Example:
_________________ -Sheep
My pockets hurt... |
|
| Back to top |
|
 |
tim6389 Professional Member


Joined: 01 Aug 2002 Posts: 790
|
Posted: Fri Aug 02, 2002 9:41 pm Post subject: hummm |
|
|
| that is how it is in the code you posted i didn't added any more buttons to it i just try the 2 that work and i have the same problem as before, unless i'am not following your other post right? |
|
| Back to top |
|
 |
SnarlingSheep Professional Member


Joined: 13 Mar 2001 Posts: 759 Location: Michigan
|
Posted: Fri Aug 02, 2002 9:46 pm Post subject: |
|
|
Oh..you said when you go from Button 1 to Button 3..I thought you added a 3rd button but it must have been a typo.
I have updated the post again and it should work now..I forgot to change %%url to %%url1. _________________ -Sheep
My pockets hurt... |
|
| Back to top |
|
 |
tim6389 Professional Member


Joined: 01 Aug 2002 Posts: 790
|
Posted: Fri Aug 02, 2002 9:53 pm Post subject: no |
|
|
sorry about that
GOOD news seems to work BUT when i first load the program it start button one before i select anything... |
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You can attach files in this forum You can download files in this forum
|
|