It is currently Sat Mar 25, 2017 12:39 pm



Welcome
Welcome to rfobasic

You are currently viewing our boards as a guest, which gives you limited access to view most discussions and access our other features. By joining our free community, you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content, and access many other special features. In addition, registered members also see less advertisements. Registration is fast, simple, and absolutely free, so please, join our community today. **You are not required to provide truthful information to any registration questions. Be whomever you wish to be.!


Post new topic Reply to topic  [ 25 posts ]  Go to page Previous  1, 2, 3  Next
Author Message
 Post subject: Re: Im new ! New help for many questions !!
Unread postPosted: Wed Jan 11, 2017 2:08 pm 
Offline

Joined: Fri Jan 06, 2017 12:44 am
Posts: 10
Thx guys !!! its work :D !!

a other question ^^ (i want to know so much XD) :


How can i clean a window ?

i open a windows with

GR.OPEN 255, 255, 255, 255
GR.ORIENTATION 1
GR.SCREEN w,h
GR.COLOR 255, 0, 0 , 0
GR.TEXT.SIZE w/14
GR.TEXT DRAW P, w/2-15, 180, "HERE IS MY TEXTE"

so, i want to "clean" the text or line i draw on the windows. I tried "CLS" but nothing happened.
Have have the ultimate solution !!!! close and open a new windows ^^ .

Have you any idea for clean the windows without close it ? :D

thx again ! ;)


Report this post
Top
 Profile  
 
 Post subject: Re: Im new ! New help for many questions !!
Unread postPosted: Wed Jan 11, 2017 3:10 pm 
Offline
User avatar

Joined: Sat Dec 08, 2012 2:14 am
Posts: 1105
Location: UK
GR.OPEN 255, 255, 255, 255
GR.ORIENTATION 1
GR.SCREEN w,h
GR.COLOR 255, 0, 0 , 0
GR.TEXT.SIZE w/14
GR.TEXT.DRAW P, w/2-15, 180, "HERE IS MY TEXTE"
PAUSE 3000
GR.CLS
GR.TEXT.DRAW P, w/2-15, 180, "MY NEW TEXTE NOW"
GR.RENDER
PAUSE 3000

Mog


Report this post
Top
 Profile  
 
 Post subject: Re: Im new ! New help for many questions !!
Unread postPosted: Wed Jan 11, 2017 3:26 pm 
Offline

Joined: Fri Jan 06, 2017 12:44 am
Posts: 10
OK, so i was because of this "pause" !! THX XD !!!!


Report this post
Top
 Profile  
 
 Post subject: Re: Im new ! New help for many questions !!
Unread postPosted: Sun Jan 15, 2017 8:24 am 
Offline

Joined: Mon Feb 08, 2016 9:07 am
Posts: 106
You need

GR.CLS
instead of
CLS

to clean the graphcs screen.


Report this post
Top
 Profile  
 
 Post subject: Re: Im new ! New help for many questions !!
Unread postPosted: Sat Jan 21, 2017 6:39 am 
Offline

Joined: Mon Nov 14, 2016 6:49 am
Posts: 39
Dear specialists,
I have issues, that my radio player do not allow me to correctly switch between stations, if I want to switch to station 12 14 or higher. And I do not know, what I AM doing wrong.
If mlist variable get value greater than 11, stations are not opened correctly.
Here is my code.
WakeLock 1
WifiLock 3
array.load mlist$[], "ČRo Radiožurnál","ČRo Dvojka","ČRo Vltava","ČRo Plus","ČRo Radio Wave","ČRo D-dur","ČRo Jazz","ČRo Rádio Junior","ČRo Radio Retro","ČRo Rádio Junior Písničky","ČRo - Radio Praha","ČRo - Sport","ČRo Brno","ČRo České Budějovice","ČRo Hradec Králové","ČRo Olomouc","ČRo Ostrava","ČRo Pardubice","ČRo Plzeň","ČRo Karlovy Vary","ČRo Regina","ČRo Sever","ČRo Liberec","ČRo Region Střední Čechy","ČRo Region Vysočina"
do
select mlist, mlist$[], ""
pause 1
if mlist =1 then: a$ ="http://icecast8.play.cz/cro1-128.mp3": Audio.stop: Audio.load n,a$: Audio.play n
if mlist =2 then: a$ ="http://icecast6.play.cz/cro2-128.mp3": Audio.stop: Audio.load n,a$: Audio.play n
if mlist =3 then: a$ ="http://icecast5.play.cz/cro3-128.mp3": Audio.stop:Audio.load n,a$: Audio.play n
if mlist =4 then: a$ ="http://icecast1.play.cz/croplus128.mp3": Audio.stop:Audio.load n,a$: Audio.play n
if mlist =5 then: a$ ="http://icecast5.play.cz/crowave-128.mp3": Audio.stop: Audio.load n,a$: Audio.play n
if mlist =6 then: a$ ="http://icecast5.play.cz/croddur-128.mp3": Audio.stop: Audio.load n,a$: Audio.play n
if mlist =7 then: a$ ="http://icecast1.play.cz/crojazz128.mp3": Audio.stop: Audio.load n,a$: Audio.play n
if mlist =8 then: a$ ="http://icecast5.play.cz/crojuniormaxi128.mp3": Audio.stop: Audio.load n,a$: Audio.play n
if mlist =9 then: a$ ="http://icecast7.play.cz/croretro128.mp3": Audio.stop: Audio.load n,a$: Audio.play n
if mlist =10 then: a$ ="http://icecast2.play.cz/cro7-128.mp3": Audio.stop: Audio.load n,a$: Audio.play n
if mlist =11 then: a$ ="http://icecast7.play.cz/crosport128.mp3": Audio.stop: Audio.load n,a$: Audio.play n
if mlist =12 then: a$ ="http://icecast2.play.cz/crocb128.mp3": Audio.stop: Audio.load n,a$: Audio.play n
if mlist =13 then: a$ ="http://icecast2.play.cz/crool128.mp3": Audio.stop: Audio.load n,a$: Audio.play n
if mlist =14 then: a$ ="http://icecast2.play.cz/cropardubice128.mp3": Audio.stop: Audio.load n,a$: Audio.play n
if mlist =15 then: a$ ="http://icecast2.play.cz/crokv128.mp3": Audio.stop: Audio.load n,a$: Audio.play n
if mlist =16 then: a$ ="http://icecast2.play.cz/crosever128.mp3": Audio.stop: Audio.load n,a$: Audio.play n
if mlist =17 then: a$ ="http://icecast2.play.cz/croliberec128.mp3": Audio.stop: Audio.load n,a$: Audio.play n
if mlist =18 then: a$ ="http://icecast2.play.cz/croliberec128.mp3": Audio.stop: Audio.load n,a$: Audio.play n
if mlist =19 then: a$ ="http://icecast2.play.cz/croregion128.mp3": Audio.stop: Audio.load n,a$: Audio.play n
if mlist =20 then: a$ ="http://icecast2.play.cz/crovysocina128.mp3": Audio.stop: Audio.load n,a$: Audio.play n
until 0


Report this post
Top
 Profile  
 
 Post subject: Re: Im new ! New help for many questions !!
Unread postPosted: Sat Jan 21, 2017 6:45 am 
Offline

Joined: Mon Nov 14, 2016 6:49 am
Posts: 39
My most complex question is, how to make code, which allow me to stop live radio playback when incoming call has occurred. And how to manage, so live radio playback will continue automatically when phone call is ended. Who would make this simple code?
I it is really very complex to achieve this when case command is being used instead of Onconsoletouch:
But onconsoletouch interrupt has strong disadvantage. When phone application window appear, onconsoletouch: interrupt lost program window focus. So it is unusable for my purposes.
This is The reason why I have decided to redesign my code to use case command instead.


Report this post
Top
 Profile  
 
 Post subject: Re: Im new ! New help for many questions !!
Unread postPosted: Sat Jan 21, 2017 8:31 am 
Offline

Joined: Tue Dec 04, 2012 10:50 am
Posts: 628
Location: UK
januszchmiel wrote:
This is The reason why I have decided to redesign my code to use case command instead.

Also a case command is much more efficient than a succession of IF with no ELSE. Then every value gets compared even though only one can be equal and all subsequent comparisons are wasted effort.

Mike.


Report this post
Top
 Profile  
 
 Post subject: Re: Im new ! New help for many questions !!
Unread postPosted: Sun Jan 22, 2017 3:34 am 
Offline

Joined: Mon Nov 14, 2016 6:49 am
Posts: 39
Thank you for yours tip. So I should use else if strategy instead of making if then condition block. I will give it A try. And please, how about my most complex problem. Stop radio player when phone is ringing. When I have used Onconsoletouch: and do until cycle, it relatively worked. But, in some cases, when Phone window has appeared, player did not continue to play. My most complex problem is, how to manage cycles for now. Because adding do and until 0 commands is The most important strategy to have success. Because now, I AM helpless to construct The code. I Am thinking to add telephony state check to separate Onbackground: label, because in this case, thread has idle priority and do not use so much CPU cycles. It is not good idea to have whole program code running on background by using Onbackground: label.


Report this post
Top
 Profile  
 
 Post subject: Re: Im new ! New help for many questions !!
Unread postPosted: Wed Jan 25, 2017 3:31 am 
Offline
User avatar

Joined: Sat Dec 08, 2012 2:14 am
Posts: 1105
Location: UK
Have you looked at the PHONE.RCV.INIT command?

Mog


Report this post
Top
 Profile  
 
 Post subject: Re: Im new ! New help for many questions !!
Unread postPosted: Fri Jan 27, 2017 9:58 am 
Offline

Joined: Fri Jan 06, 2017 12:44 am
Posts: 10
All work fine thx guys !

I have a other and very simple question ^^ :
Is it possible to change the size to Line ?
Because when i draw a line, its only 1 pixel to size :(...

Thx !


Report this post
Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 25 posts ]  Go to page Previous  1, 2, 3  Next


Who is online

Users browsing this forum: No registered users and 2 guests


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 post attachments in this forum

Search for:
Jump to:  
suspicion-preferred