@@ -15,6 +15,7 @@ and the tasks that get performed on the input files.
15
15
2 . [ Command Line Options] ( #command-line-options )
16
16
1 . [ Configuration Location] ( #configuration-location )
17
17
3 . [ Tutorial] ( #tutorial )
18
+ 1 . [ Basic Tutorial] ( #basic-tutorial )
18
19
4 . [ License] ( #license )
19
20
20
21
## Installation
@@ -53,7 +54,81 @@ pyWinContext.exe -c "C:\Users\Example\pyWinContext"
53
54
54
55
## Tutorial
55
56
56
- TODO: Basic Tutorial...
57
+ ### Basic Tutorial
58
+
59
+ When you first open up pyWinContext, you'll be presented with a window that
60
+ looks like this.
61
+
62
+ ![ ] ( https://i.imgur.com/GtYExdj.png )
63
+
64
+ First we start in the left pane of the window to setup our actions. By pressing
65
+ the "New Action" button, you can add a new item to the list, with the name
66
+ selected and editable.
67
+
68
+ The name acts as a unique identifier for the action. You can also edit the
69
+ description by double clicking the description box. The contents of that box
70
+ will be used as the text in the context menu.
71
+
72
+ ![ ] ( https://i.imgur.com/7VL5NWf.png )
73
+
74
+ As an example, we're going to make an action that will show details about a
75
+ file in a window, such as name, filetype and file size. As such, I've named the
76
+ action "filedetails", and gave it the description "List File Details".
77
+
78
+ ![ ] ( https://i.imgur.com/ZjS0TdY.png )
79
+
80
+ Next, we move to the middle pane to select a filetype we'd like this action to
81
+ show for. We can search for a specific filetype to make it easier to find. I'm
82
+ going to apply our action to the ".txt" filetype, by searching ".txt" and
83
+ ticking it's checkbox.
84
+
85
+ ![ ] ( https://i.imgur.com/y8Anvxu.png )
86
+
87
+ (Note: If a filetype you're looking for isn't shown, you can add it using the
88
+ textbox at the bottom of this pane)
89
+
90
+ Then we move on to the right pane. Here we can set the name and description,
91
+ just like the left pane, with the addition that we can also assign an icon if
92
+ we want.
93
+
94
+ ![ ] ( https://i.imgur.com/v5yblVG.png )
95
+
96
+ By opening up the command editor, we can actually start to define what our
97
+ action does when we click on it.
98
+
99
+ ![ ] ( https://i.imgur.com/1BbQr6x.png )
100
+
101
+ Setting the editor to "Command List" allows us to write our basic script inside
102
+ the application itself. By adding commands and writing a few lines, we get
103
+ something like this.
104
+
105
+ ![ ] ( https://i.imgur.com/2o6JEpm.png )
106
+
107
+ Hitting OK, and then saving (either through the File > Save menu, or with the
108
+ Ctrl + S shortcut) will allow us to test our action.
109
+
110
+ If you launched with File Export Mode, an Explorer window with two registry
111
+ files will open. To install our action, we use the Setup.reg file.
112
+
113
+ ![ ] ( https://i.imgur.com/NJOhYvz.png )
114
+
115
+ If you launched with Direct Edit Mode, changes will have been applied in the
116
+ background. All we need to do, is find .txt file, right click it, and see if
117
+ our action shows up.
118
+
119
+ ![ ] ( https://i.imgur.com/6JHpA9u.png )
120
+
121
+ It worked! And we get to see what our script does when we execute it.
122
+
123
+ ![ ] ( https://i.imgur.com/ZRZ1pJH.png )
124
+
125
+ Anything that can be executed from a batch script will work with pyWinContext,
126
+ so the possibilities for using command line applications and automation tools
127
+ are endless.
128
+
129
+ These are just the basics. With groups added into the picture, you can start to
130
+ build up nested menus and folders for all your actions, like in the preview
131
+ picture at the top of the page, and help immensely with automation.
57
132
58
133
## License
59
134
0 commit comments