Saturday, July 21, 2018

#1 2010-09-01 09:55:12 am

ebanfield
Member
Registered: 2010-07-15
Posts: 6

Have interface, need script

I've designed a simple test interface that is surely not unique, and I'm looking for the shortest script that will make it work. I've posted a picture of the interface, with more information here:


http://picasaweb.google.com/elliottbanf … 3588624626

Thanks for your attention.

Model: MacPro
AppleScript: 2.1.2
Browser: Safari 533.16
Operating System: Mac OS X (10.6)

Offline

 

#2 2010-09-01 10:24:46 am

StefanK
Member
From:: St. Gallen, Switzerland
Registered: 2006-10-21
Posts: 11499
Website

Re: Have interface, need script

Hi,

maybe not the shortest one, but quite fast even if you add more matrices.
The on clicked handler is connected to the Go button,
the main window is named "main", the matrices are named "matrix1" and "matrix2"

Applescript:


on clicked theObject
   tell window "main"
       set row1 to current row of matrix "matrix1"
       set row2 to current row of matrix "matrix2"
   end tell
   if row2 = 1 then
       if row1 = 1 then
           log "AC"
       else
           log "BC"
       end if
   else if row2 = 2 then
       if row1 = 1 then
           log "AD"
       else
           log "BD"
       end if
   end if
end clicked


regards

Stefan

Offline

 

#3 2010-09-02 02:52:38 pm

ebanfield
Member
Registered: 2010-07-15
Posts: 6

Re: Have interface, need script

Many thanks, Stefan! I'll check this out.

Offline

 

Board footer

Powered by FluxBB

RSS (new topics) RSS (active topics)