mIRC Home    About    Download    Register    News    Help

Print Thread
#259886 08/02/17 04:09 PM
Joined: Feb 2017
Posts: 3
I
Ignant Offline OP
Self-satisified door
OP Offline
Self-satisified door
I
Joined: Feb 2017
Posts: 3
I am trying to get all the Text/radio/edit inputs to a text file and can not for the sake of me figure it out. I have seen some previous builds, but can no longer find them.

Below is a snipit of the full code but i do not believe that is needed for a little nudge in the right direction.

Code:
dialog TAIR {
  title "Technical Assistance Input Report"
  size -1 -1 240 251
  option dbu
  combo 13, 10 13 110 18, size drop
  text "Method of Request:", 14, 10 2 53 8
  radio "Yes", 15, 130 19 25 10, group
  radio "No", 16, 160 19 25 10
  text "Is this a continuation of a previous TA?  If yes, List date of original TA (DD/MMM/YY).", 17, 130 2 105 16
  edit "", 18, 181 19 50 10
tab "Contact Info", 19, 2 50 234 181
  text "Person's Name:", 25, 10 69 37 8, tab 19
  text "Point of Contact:", 26, 10 80 45 8, tab 19
  button "Save", 22, 200 235 37 12


Combo Box Code
Code:
on 1:dialog:TAIR:init:*: {
did -a TAIR 13 IRC
did -a TAIR 13 Phone
did -a TAIR 13 Email


On click for button
Code:
on *dialog:TAIR:sclick:22:{
write example.txt (all fields of dialog)}


i have tried calling out IDs but not sure on the format, have been doing research for about a day now on this.

Thank you for your support.

Joined: May 2015
Posts: 249
Fjord artisan
Offline
Fjord artisan
Joined: May 2015
Posts: 249
$did(name,id)


Dont give a fish - teach to fish!
Joined: Feb 2017
Posts: 3
I
Ignant Offline OP
Self-satisified door
OP Offline
Self-satisified door
I
Joined: Feb 2017
Posts: 3
Originally Posted By: splinny
$did(name,id)


Thank you!

Originally Posted By: me

Code:
on *:dialog:TAIR:sclick:22: {
 write example.text $did(TAIR,14) $did(TAIR,13)
 write example.text $did(TAIR,17)


Is working great for the time being, Is there a way to set "example.text" or the file name to a variable?

For example if field 20 is a date and field 25 is the customer Could i tie these to be the file name?

I tried:
Code:
write $did(TAIR, 20) $+ _ $+ $did(TAIR,25).txt $did(TAIR,14) $did(TAIR,13)


Also,

Code:
write ($did(TAIR, 20) $+ _ $+ $did(TAIR,25).txt) $did(TAIR,14) $did(TAIR,13)


and,

Code:
write $did(TAIR, 20) $did(TAIR,25).txt $did(TAIR,14) $did(TAIR,13)


Any further assistance would be great as well.



Okay figured out the variable thing, but still struggling to get the write command to take it. Currently I have this:

Code:
alias filename {
var %date = $did(TAIR,24), %customer = $did(TAIR, 29), %myFile = %date $+ _ $+ %customer $+ .txt
}

write %myFile $did(TAIR,14) $did(TAIR,13)



when i echo the alias section i am getting the DATE_CUSTOMER.txt but when it is used in the write i am getting field 14 as the file name and field 13 as the contents of the file.

any ideas?

Last edited by Ignant; 13/02/17 06:37 PM.
Joined: Feb 2017
Posts: 3
I
Ignant Offline OP
Self-satisified door
OP Offline
Self-satisified door
I
Joined: Feb 2017
Posts: 3
Thank you Splinny I have actually figured out all my answers at this point! and your $did answer got me the right direction. All is solved currently!


Link Copied to Clipboard