home *** CD-ROM | disk | FTP | other *** search
/ Amoszine 11 / Amoszine 11 (Disk 2 of 2).adf / Various_Source.lha / zonefinder.amos / zonefinder.amosSourceCode
Encoding:
AMOS Source Code  |  1996-03-06  |  923 b   |  36 lines

  1. ' Set your mouse zones on top of piccy and save info out as an ascii 
  2. ' file which can be merged into your Amos listings easily using the
  3. ' merge ascii option. No more messing about .... 
  4. '
  5. ' I got this from the Aminet CD Set 2 somewhere. Can't remember where
  6. ' abouts though! Sorry, but no author given in source! Enjoy ... AG! 
  7. '  
  8.  
  9. Input "How many zone do you wish to define?";A
  10. Dim ZN(A,4) : Dim ZN$(A)
  11.  
  12. F$=Fsel$("**","Select an IFF to Load")
  13. Load Iff F$,0
  14.  
  15. For T=1 To A
  16. Do 
  17. X=X Screen(X Mouse) : Y=Y Screen(Y Mouse)
  18.  
  19. MC=Mouse Click
  20. If MC and R=0 Then Inc Q : ZN(Q,1)=X : ZN(Q,2)=Y : R=1 : Change Mouse 2 : MC=0
  21. If MC and R=1 Then ZN(Q,3)=X : ZN(Q,4)=Y : R=0 : Change Mouse 1 : Exit 
  22. Loop 
  23. Next 
  24. Cls 
  25. For T=1 To A
  26. ZN$(T)="data "+Str$(ZN(T,1))+","+Str$(ZN(T,2))+","+Str$(ZN(T,3))+","+Str$(ZN(T,4))
  27. Print ZN$(T)
  28. Next 
  29.  
  30. F$=Fsel$("**","","Select ASCII Filename")
  31. Open Out 1,F$
  32. For T=1 To A
  33. Print #1,ZN$(T)
  34. Next 
  35. Close 1
  36. End