Can't link files in Xmind

Stuff that has yet to be sorted into a category.
Message
Author
der-schutzhund
Posts: 1045
Joined: Mon 26 Nov 2007, 22:07
Location: Blomberg / Germany

#21 Post by der-schutzhund »

Hello Rattlehead and seaside,

I am a good step forward! I can now create the shortcut in Xfce. Now when I mark txt, pdf, html files in Xmind and then enter the shortcut ALT + m, always an empty text file with Geany is started.
This is definitely a start!

--------------------------------

latest message: txt, jpg, pdf to open properly!
Super good!
Shame on me (I had not installed xdotool)
Html files are still a problem.
This does not work because I have an Opera.
When I click in Thunar a *. html page will then start normally in Opera.

-----------------------------------------
it is up to the ending!
When I enter the link with *. html then it works!
If the extension is php but what happens quite often even a text editor opens.
For example, only the address entered with http://www.google.de then it does not run too!

Regards

Wolfgang

User avatar
Rattlehead
Posts: 368
Joined: Thu 11 Sep 2008, 11:40

#22 Post by Rattlehead »

Wolfgang,

congratulations for your advances. Your post has 3 different parts, my guess is you were logging your advances along the way and then sent the whole text at once, so the only problem yet to solve is the last one, with internet links:
If the extension is php but what happens quite often even a text editor opens.
For example, only the address entered with http://www.google.de then it does not run too!
I think the reason is simple: I don't link internet files in Xmind, so my script does not handle them. The program currently identifies file extensions, but it should add a condition to identify beginnings (to detect http://, www...), and in such case do

Code: Select all

opera $listed &
Are you bash savy enough to add the condition by yourself? If you haven't figured it out by the weekend, let me know and I will write the code -I don't have the time right now-.

der-schutzhund
Posts: 1045
Joined: Mon 26 Nov 2007, 22:07
Location: Blomberg / Germany

#23 Post by der-schutzhund »

Hello my friends :D
Our community project is completed.
In the script I built a query that checks whether the command line "http" implies. If this is so the opera starts.
Now all sorts of file types open with one touch.
Thank you both again and best regards to Spain!

Wolfgang

Code: Select all

#!/bin/bash

# Rattlehead - mods by seaside and der-schutzhund November 16,2011
# Grabxlink - initially set at Alt-m
# Requires Xmind already open and active, and the required 'bubble' selected
#

# von Rattlehead - erweitert von seaside und der-schutzhund November 16.2011
# Grabxlink - sollte nach usr/bin geschoben werden
# dieses Script öffnet aus Xmind für Linux unter 431-de alle Dateien wie
# txt, img, pdf, html über eine Funktionstaste oder Tastenkombination
# Xmind muss gestartet sein und die gewünschte Datei markiert
# Hinweis: Mit dem jeweiligen JWM oder Xfce etc. muss ein shortcut angelegt werden
# der dann Grabxlink startet
# xdotool muss ebenfalls installiert sein!

#Keypress simulation

#Open the required Xmind dialog
sleep .5
xdotool key ctrl+h

#Select the whole path
sleep .2
xdotool key ctrl+a

#Copy it
sleep .2
xdotool key ctrl+c
sleep .2

#Close the dialog
xdotool key Escape

#Get the clipboard content and put it in the 'listed' variable
listed=`xclip -o -selection clipboard`


#Grab the file extension
trm=`echo "${listed#*.}"`
[[ -z $trm ]] && exit


#test if "http" is in 'listed' then start with Opera
if [[ $listed =~ .*http.* ]]
then
 opera $listed &

else

#Open file
 Xmind-open "$listed"
fi

User avatar
Rattlehead
Posts: 368
Joined: Thu 11 Sep 2008, 11:40

#24 Post by Rattlehead »

Hey Wolfgang,

I'm glad you found the solution. As I am only an occasional programmer, my regular expressions become rusty from one time to another. Besides, there are differences in bash, grep, awk... I guess it's the price of power :)

I'll implement your changes myself when I have the occasion. It will be great being able to add websites too. Now one can have his whole life in an Xmind if he wants to! :)

der-schutzhund
Posts: 1045
Joined: Mon 26 Nov 2007, 22:07
Location: Blomberg / Germany

#25 Post by der-schutzhund »

Hey Rattlehead,

've Found a bug.
When files are attached as Appendix it can not be opened because it directly into the xmid -. File is saved, and therefore has no directory.
Now I save the attachment first before and then load back to normal.
Can you tell me how I can program xdotool with the arrow keys?
Rattlehead wrote:Hey Wolfgang,

I'm glad you found the solution. As I am only an occasional programmer, my regular expressions become rusty from one time to another. Besides, there are differences in bash, grep, awk... I guess it's the price of power :)

I'll implement your changes myself when I have the occasion. It will be great being able to add websites too. Now one can have his whole life in an Xmind if he wants to! :)

seaside
Posts: 934
Joined: Thu 12 Apr 2007, 00:19

#26 Post by seaside »

der-schutzhund wrote:
Can you tell me how I can program xdotool with the arrow keys?
der-schutzhund.

Code: Select all

xdotool key [Up] [Down] [Left] [Right] 
Cheers,
s

der-schutzhund
Posts: 1045
Joined: Mon 26 Nov 2007, 22:07
Location: Blomberg / Germany

#27 Post by der-schutzhund »

Thanks for the info. It also now works with files from the Annex. However, there are now two scripts "Grabxlink" and "Grabxlink-a". Both call at the end of the script "Xmind-open". Soon I will try a complete pet and a sfs with all the program files and create scripts.
Do you know how to xdotool in letters like "ä" generated?

Regards

Wolfgang
seaside wrote:
der-schutzhund wrote:
Can you tell me how I can program xdotool with the arrow keys?
der-schutzhund.

Code: Select all

xdotool key [Up] [Down] [Left] [Right] 
Cheers,
s

User avatar
Rattlehead
Posts: 368
Joined: Thu 11 Sep 2008, 11:40

#28 Post by Rattlehead »

Hey Wolfgang,

long time due to the forum failure. In the meantime, I asked at the Xdotool mailing list about weird characters, and here's the reply by the developer himself:
Yeah some of the character mapping names can be confusing. In general, 'xdotool key' characters valid are any 'key symbol' or XKeysym.

The 'keysymdef.h' file in X11 will help you. Any 'XK_'-prefixed name is valid; simply drop the 'XK_' part.

http://cgit.freedesktop.org/xorg/proto/ ... eysymdef.h

For example, to have xdotool send 'a' with umlaut/diaeresis, do:

xdotool key adiaeresis

The capital letter form is 'Adiaeresis' (look in the above keysymdef.h for XK_Adiaeresis)

User avatar
Rattlehead
Posts: 368
Joined: Thu 11 Sep 2008, 11:40

#29 Post by Rattlehead »

Hey Wolfgang,

long time due to the forum failure. In the meantime, I asked at the Xdotool mailing list about weird characters, and here's the reply by the developer himself:
Yeah some of the character mapping names can be confusing. In general, 'xdotool key' characters valid are any 'key symbol' or XKeysym.

The 'keysymdef.h' file in X11 will help you. Any 'XK_'-prefixed name is valid; simply drop the 'XK_' part.

http://cgit.freedesktop.org/xorg/proto/ ... eysymdef.h

For example, to have xdotool send 'a' with umlaut/diaeresis, do:

xdotool key adiaeresis

The capital letter form is 'Adiaeresis' (look in the above keysymdef.h for XK_Adiaeresis)

User avatar
Rattlehead
Posts: 368
Joined: Thu 11 Sep 2008, 11:40

#30 Post by Rattlehead »

Hey Wolfgang,

long time due to the forum failure. In the meantime, I asked at the Xdotool mailing list about weird characters, and here's the reply by the developer himself:
Yeah some of the character mapping names can be confusing. In general, 'xdotool key' characters valid are any 'key symbol' or XKeysym.

The 'keysymdef.h' file in X11 will help you. Any 'XK_'-prefixed name is valid; simply drop the 'XK_' part.

http://cgit.freedesktop.org/xorg/proto/ ... eysymdef.h

For example, to have xdotool send 'a' with umlaut/diaeresis, do:

xdotool key adiaeresis

The capital letter form is 'Adiaeresis' (look in the above keysymdef.h for XK_Adiaeresis)

User avatar
Rattlehead
Posts: 368
Joined: Thu 11 Sep 2008, 11:40

#31 Post by Rattlehead »

Hey Wolfgang,

long time due to the forum failure. In the meantime, I asked at the Xdotool mailing list about weird characters, and here's the reply by the developer himself:
Yeah some of the character mapping names can be confusing. In general, 'xdotool key' characters valid are any 'key symbol' or XKeysym.

The 'keysymdef.h' file in X11 will help you. Any 'XK_'-prefixed name is valid; simply drop the 'XK_' part.

http://cgit.freedesktop.org/xorg/proto/ ... eysymdef.h

For example, to have xdotool send 'a' with umlaut/diaeresis, do:

xdotool key adiaeresis

The capital letter form is 'Adiaeresis' (look in the above keysymdef.h for XK_Adiaeresis)

User avatar
Rattlehead
Posts: 368
Joined: Thu 11 Sep 2008, 11:40

#32 Post by Rattlehead »

WTF? It continues showing blank posts... sorry for the garbage, I'm just trying to post in my usual way here

User avatar
Rattlehead
Posts: 368
Joined: Thu 11 Sep 2008, 11:40

#33 Post by Rattlehead »

Damn, here I come again

I wrote to Xdotool developer and this is what he said:
Yeah some of the character mapping names can be confusing. In general, 'xdotool key' characters valid are any 'key symbol' or XKeysym.

The 'keysymdef.h' file in X11 will help you. Any 'XK_'-prefixed name is valid; simply drop the 'XK_' part.
http://cgit.freedesktop.org/xorg/proto/ ... eysymdef.h

For example, to have xdotool send 'a' with umlaut/diaeresis, do:

xdotool key adiaeresis

The capital letter form is 'Adiaeresis' (look in the above keysymdef.h for XK_Adiaeresis)

Post Reply