dialog bpl { title "Bible Passage System" size -1 -1 172 100 option dbu box "Old Testament Book's", 1, 2 1 65 23 combo 2, 5 10 59 50, size drop box "New Testament Book's", 3, 2 26 65 23 combo 4, 5 35 59 50, size drop box "Chapter", 5, 68 1 29 23 edit "", 6, 76 10 11 9, autohs box "Chapter", 7, 68 26 29 23 edit "", 8, 76 35 11 9, autohs box "Verse", 9, 98 1 24 23 edit "", 10, 104 10 11 9, autohs box "Verse", 11, 98 26 24 23 edit "", 12, 104 35 11 9, autohs box "Old Testament ", 13, 123 1 47 23 button "Find", 14, 133 10 23 10, flat box "New Testament", 15, 123 26 47 23 button "Find", 16, 134 35 23 10, flat box "Bible Passage", 17, 2 51 168 47 edit "", 18, 5 60 162 21, read multi hsbar button "Clear", 19, 6 84 30 10, flat button "Clipboard", 20, 49 84 30 10, flat button "Msg Chan", 21, 93 84 30 10, flat button "Exit", 22, 137 84 30 10, flat cancel } menu menubar,channel { .Bible Passage Look Up:{ bpl } } on *:load: { echo 12 -a You Have Just Loaded Napa182's Bible Passage Dialog echo 12 -a A Script0rs Inc. Production echo -a 14,1(14,1¯15,1¯0,1¯0,1º «×X§Ç®îÞt0®§X×» º0,1¯15,1¯14,1¯)™ } alias bpl { dialog $iif($dialog(bpl),-v,-md) bpl bpl } on *:dialog:bpl:close:0:{ unset %biblebooks* %new %old } on *:dialog:bpl:init:0:{ if (!%biblebooks) { set %biblebooks Genesis Exodus Leviticus Numbers Deuteronomy Joshua Ruth 1Samuel 2Samuel 1Kings 2Kings 1Chronicles 2Chronicles Ezra Nehemiah Esther Job Psalm Proverbs Ecclesiastes Songofsolomon Isaiah Jeremiah Lamentations Ezekiel Daniel Joel Amos Obadiah Jonah Micah Nahum Habakkuk Zephaniah Haggai Zechariah Malachi } if (!%biblebooks2) { set %biblebooks2 Matthew Mark Luke John Acts Romans 1Corinthians 2Corinthians Galatians Ephesians Philippians Colossians 1Thessalonians 2Thessalonians 1Timothy 2Timothy Titus Philemon Hebrews James 1Peter 2Peter 1John 2John 3John Jude Revelation } var %otb = $gettok(%biblebooks,1-,32) var %boo = $numtok(%otb,32), %oh = 1 while ( %oh <= %boo ) { did -a bpl 2 $gettok(%otb,%oh,32) inc %oh } var %ntb = $gettok(%biblebooks2,1-,32) var %bo = $numtok(%ntb,32), %ooh = 1 while ( %ooh <= %bo ) { did -a bpl 4 $gettok(%ntb,%ooh,32) inc %ooh } } on *:dialog:bpl:sclick:*:{ if ($did == 14) { unset %new set %old 1 if ($did(6).text !isnum) || ($did(10).text !isnum) { noop $input(Please Enter Numbers Only!,uwo,Error) did -r bpl 6,10 } elseif (!$did(2).seltext) { noop $input(Please Pick A Old Testament Book,uwo,Error) } else { if ($sock(bverse)) .sockclose bverse set %verse $did(2).seltext $+ $chr(43) $+ $did(6).text $+ $chr(37) $+ 3A $+ $did(10).text sockopen bverse bibleresources.bible.com 80 } } if ($did == 16) { unset %old set %new 1 if ($did(8).text !isnum) || ($did(12).text !isnum) { noop $input(Please Enter Numbers Only!,uwo,Error) did -r bpl 8,12 } elseif (!$did(4).seltext) { noop $input(Please Pick A New Testament Book,uwo,Error) } else { if ($sock(bverse)) .sockclose bverse set %verse $did(4).seltext $+ $chr(43) $+ $did(8).text $+ $chr(37) $+ 3A $+ $did(12).text sockopen bverse bibleresources.bible.com 80 } } if ($did == 19) { did -r bpl 18 } if ($did == 20) { clipboard $did(18).text } if ($did == 21) { if (!$did(18).text) { noop $input(No Passage To Message,uwo,Error) } elseif (!%new) { msg $active 14,1[12,1»0,1:: Book $did(2).seltext 0,1::12,1«14,1]14,1[12,1»0,1:: Chapter $did(6).text 0,1::12,1«14,1]14,1[12,1»0,1:: $did(18).text 0,1::12,1«14,1]14,1[12,1»0,1:: Bible Script By :: Napa182 0,1::12,1«14,1] } elseif (!%old) { msg $active 14,1[12,1»0,1:: Book $did(4).seltext 0,1::12,1«14,1]14,1[12,1»0,1:: Chapter $did(8).text 0,1::12,1«14,1]14,1[12,1»0,1:: $did(18).text 0,1::12,1«14,1]14,1[12,1»0,1:: Bible Script By :: Napa182 0,1::12,1«14,1] } } } on *:SOCKOPEN:bverse: { sockwrite -nt $sockname GET /passagesearchresults.php?passage1= $+ %verse $+ &version1=31 HTTP/1.1 sockwrite -nt $sockname Host: bibleresources.bible.com sockwrite -nt $sockname $crlf } on *:SOCKREAD:bverse: { if ($sockerr) { echo -a Socket Error: $sockname } else { var %bible sockread %bible if (*not found* iswm %Bible) { did -ra bpl 18 Sorry No Such Bible Passage unset %verse %passage sockclose bverse } if (*|<[^>]*>|<[^>]*/g,$chr(32),%b) %b = $remove(%b, ) return %b }