How on a keyboard enter a variable using xdotool?

I code a little script to save some data from the Internet every day. Therefore, I use xdotool to simulate my entire navigation until I have a firefox save window in front of me, I mean, in front of my script. Ok, everything is fine, so far here ... But, when I try to use the day of the week (or any data in a variable i) as part of the file name that needs to be saved ........... hmmm → "nothing going on. " = (

Well, I think I have a simple problem here, I tried very hard to use the contents of the variable that I received with the date function, or a simple channel directly, but xdotool refuses to enter this information in the file name field in the save window of the file that is selected by obvius and the selected text.

Some light on the way, Masters! I am a terrible noob! Sorry =) So this is the code I tried (the problem is in the last line):

#!/bin/bash

i=|date +%A
echo $i

WID=`xdotool search --name "Mozilla Firefox" | head -1`
xdotool windowactivate $WID
xdotool key ctrl+l
xdotool type "http://whatever.com.au"
xdotool key Return 
sleep 2
xdotool key ctrl+s
sleep 2

xdotool type WeekDayIs$i

I think that I am missing something really obvius, maybe some decency ....

I'm really a beggar, so don't blame me so much. I tried with "$i"and {"$i"}and '$'also .. nothing works ... = / Thank you all.

ps: , - - - , , ...;-) EDIT:

POS-:

yes shellter, YesTuesday, 3 . -, . .

#!/bin/bash
i=|date +%A
echo $i
echo $i
echo $i

i=$(date +%A)

echo Yes$i
+5
1

xdotool, , , , , .

i=|date +%A

i=$(date +%A)

,

xdotool type WeekDayIs$i

$i .

, .

P.S. StackOverflow (SO) , , , Q/A, , http://i.imgur.com/kygEP.png, , , , , http://i.imgur.com/uqJeW.png

+7

All Articles