txt file timer translation to 5.1.x
 

News:

29 December 2022 - PtokaX 0.5.3.0 (20th anniversary edition) released...
11 April 2017 - PtokaX 0.5.2.2 released...
8 April 2015 Anti child and anti pedo pr0n scripts are not allowed anymore on this board!
28 September 2015 - PtokaX 0.5.2.1 for Windows 10 IoT released...
3 September 2015 - PtokaX 0.5.2.1 released...
16 August 2015 - PtokaX 0.5.2.0 released...
1 August 2015 - Crowdfunding for ADC protocol support in PtokaX ended. Clearly nobody want ADC support...
30 June 2015 - PtokaX 0.5.1.0 released...
30 April 2015 Crowdfunding for ADC protocol support in PtokaX
26 April 2015 New support hub!
20 February 2015 - PtokaX 0.5.0.3 released...
13 April 2014 - PtokaX 0.5.0.2 released...
23 March 2014 - PtokaX testing version 0.5.0.1 build 454 is available.
04 March 2014 - PtokaX.org sites were temporary down because of DDOS attacks and issues with hosting service provider.

Main Menu

txt file timer translation to 5.1.x

Started by zung, 11 July, 2006, 06:16:04

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

zung

Ok...

I only use 2 scripts at my hub .. with antiadvertising 6Marilyn6Manson6 and UwV
saved me : )

I'm sorry to ask again but with the translation of this one i promise to not bother again : )))
before script
file = "txt/textfile.txt" 
used to be inside scripts folder and i dont know it it's only a case
on how new ptokax handle paths.. sorry for my stupidity
here it is :
bot = "texttimer" 
mins = 1 
file = "txt/textfile.txt" 

function Main() 
	SetTimer(mins*60000) 
	StartTimer() 
end 

function OnTimer() 
	local handle = openfile(file, "r") 
	if (handle ~= nil) then 
		local line = read(handle) 
		while line do 
			SendToAll(bot,line) 
			line = read(handle) 
		end 
		closefile(handle) 
	end 
end

Markitos

#1
Quote from: zung on 11 July, 2006, 06:16:04
Ok...

I only use 2 scripts at my hub .. with antiadvertising 6Marilyn6Manson6 and UwV
saved me : )

I'm sorry to ask again but with the translation of this one i promise to not bother again : )))
before script
file = "txt/textfile.txt" 
used to be inside scripts folder and i dont know it it's only a case
on how new ptokax handle paths.. sorry for my stupidity
here it is :

bot = "texttimer" 
mins = 1 
file = "txt/textfile.txt" 

function Main() 
	SetTimer(mins*60000) 
	StartTimer() 
end 

function OnTimer() 
	local handle = openfile(file, "r") 
	if (handle ~= nil) then 
		local line = read(handle) 
		while line do 
			SendToAll(bot,line) 
			line = read(handle) 
		end 
		closefile(handle) 
	end 
end



Search for it...there are many

zung

Sure and all of these 'many" under 5.1.x are small , simple, fast and do "only" and exactly what this one does .

please help.. I'm blond ... not a programer genious : )))

jiten

Quote from: zung on 11 July, 2006, 17:37:47
Sure and all of these 'many" under 5.1.x are small , simple, fast and do "only" and exactly what this one does .

please help.. I'm blond ... not a programer genious : )))

Search the forum for "rotating message" or "txt show".

I'm sure that one of those will fill your request.

zung

Thanks Mutor : )
Your translation made me understand a bit more on how scripts work with txt files .
Even a blonde  ??? and if I have time to study , maybe someday I can help with this comunity as well
as your will to help me  ;)


xoxo

Vanessa

SMF spam blocked by CleanTalk