Home
JAQForum Ver 24.01
Log In or Join  
Active Topics
Local Time 22:15 02 Aug 2025 Privacy Policy
Jump to

Notice. New forum software under development. It's going to miss a few functions and look a bit ugly for a while, but I'm working on it full time now as the old forum was too unstable. Couple days, all good. If you notice any issues, please contact me.

Forum Index : Microcontroller and PC projects : Tera Term instruction required

     Page 2 of 2    
Author Message
TassyJim

Guru

Joined: 07/08/2011
Location: Australia
Posts: 6283
Posted: 02:59am 15 May 2019
Copy link to clipboard 
Print this post

Something like this

msg = 'Enter month required'
inputbox msg 'Download'

monthtoget = inputstr

sendln monthtoget


The last line is just for testing.
You can test it by entering any command in the messagebox and it gets sent.

Jim
VK7JH
MMedit
 
Chrisk

Senior Member

Joined: 21/12/2014
Location: Australia
Posts: 122
Posted: 12:09am 17 May 2019
Copy link to clipboard 
Print this post


Hi Jim
Still having problems.
Had it working but wanted to refine it with the input box but cannot get around this error.
Not sure what's the problem with converting a string to a number, perhaps it's the wrong way to go. Looked up on the Tera Term sites but nothing that I can see helps
Tried using the string 'firstday' but wouldn't increment as it was a string ???
Thanks for your help so far.

Chris K

File below.

; macro of Tera Term
; dwnmacro.ttl
; Download greenhouse files
; 17/5/19
connect"
;
send #3 ; Sends ^C
sendln
send'- Download program -'
pause 1
send #3
sendln
pause 1
msg = 'Enter month required'
inputbox msg 'Month'
month = inputstr
send 'For the month of 'month
send #3
;
msg = 'First day of month'
inputbox msg 'First day'
firstday = inputstr
send 'The first day is 'firstday
send #3
;
msg = 'Last day of month'
inputbox msg 'last day'
lastday = inputstr
send 'The last day is 'lastday
send #3
;
str2int n firstday
send n ; something wrong in the above line
sendln
end
;this is how it goes on but I am aware it needs some changes
;had it working without the use of the above input section
;n = n - 1
n = 0
do
n = n + 1
If n = 10 then ; 01 to 09 done
goto remainder
else
endif
int2str xday n ; Assigns 'n' to xday
send xday ;check if works to here
;end 'another test stop
thisfile = "GH19050"
strconcat thisfile xday ; Appends a copy of 'n'
strconcat thisfile ".txx" ; give <thisfile> an extension .txx
send thisfile
sendln "XMODEM SEND " #34 thisfile #34 ;Sends data to file
pause 2
recfile = "C:\Users\CK\Download Data\" ;File save directory
strconcat recfile thisfile
xmodemrecv recfile 1 1
pause 3 ; problem at pause = 1, CCM needs it greater
loop while result = 1
;
;This next part copies the files from the 10th day onwards
;
:remainder ;rem'd out
;m = 9
;
end
 
Chrisk

Senior Member

Joined: 21/12/2014
Location: Australia
Posts: 122
Posted: 07:05am 17 May 2019
Copy link to clipboard 
Print this post

I noticed I rem'd out the wrong line. Should have been:
;n = 0
 
TassyJim

Guru

Joined: 07/08/2011
Location: Australia
Posts: 6283
Posted: 01:34pm 17 May 2019
Copy link to clipboard 
Print this post

I haven't done much with TeraTerm macros so I am flying blind.
I will have another play when I find time over the next week or so.
I have just landed after 36 hours of airline air and am not in the mood to do any thinking for a day or two.

Thought I could escape the Aussie elections only to land in Denmark where they are having theirs!

Jim

VK7JH
MMedit
 
Chrisk

Senior Member

Joined: 21/12/2014
Location: Australia
Posts: 122
Posted: 11:47pm 17 May 2019
Copy link to clipboard 
Print this post

Thanks Jim
Cannot seem to get my head around these string conversions

Hope your team wins and it's all over. As long as it is the same as mine.

How would you be in America 2 years.
Wouldn't you be counting there.

Chris K


 
Chrisk

Senior Member

Joined: 21/12/2014
Location: Australia
Posts: 122
Posted: 05:09am 28 May 2019
Copy link to clipboard 
Print this post

Hi again
Thought this might be useful to someone.

Playing around with Tera Term macro had me looking up info on how I could start the macro directly from my Win7 desktop.
I felt that there was a better way to start the macro than invoking
Tera Term : Control : and selecting the macro.
I found all sorts of ideas but none seemed to work for me.

Some of you may have known this already but this is how I went about it.

Create a .ttl program in notepad or some other editor.
Right click on the file and click on 'Browse'
Browse to Tera Term under Program files
Within the Tera Term folder will be ttpmacro.exe
Click on ttpmacro.exe and then 'Open'
Now .ttl is associated to ttpmacro
Job done
Now if you have your Tera Term macro file say "asdf" with the ttl extention on the desktop a double click will start the macro.

Chris K
 
     Page 2 of 2    
Print this page


To reply to this topic, you need to log in.

The Back Shed's forum code is written, and hosted, in Australia.
© JAQ Software 2025