-
-
Notifications
You must be signed in to change notification settings - Fork 27
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
0c98237
commit 19e16e2
Showing
3 changed files
with
25 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
#Create MadEdit Object for the active edit | ||
medit = MadEdit() | ||
|
||
newline = '\r' | ||
if medit.GetInsertNewLineType() == MadNewLineType.DOS: | ||
newline += '\n' | ||
elif medit.GetInsertNewLineType() == MadNewLineType.Unix: | ||
newline = '\n' | ||
|
||
result = InputBox("Please input how many lines you want to insert:", "Input lines") | ||
try: | ||
num = int(result) | ||
if num > 0: | ||
lines = newline * num | ||
medit.InsertStr(lines) | ||
else : | ||
MsgBox("Input Wrong numbers", "ERROR", MadDlgStyle.ICON_ERROR_HAND_STOP | MadDlgStyle.OK) | ||
except: | ||
MsgBox("Input Wrong numbers", "ERROR", MadDlgStyle.ICON_ERROR_HAND_STOP | MadDlgStyle.OK) | ||
|
||
print '====' | ||
print lines | ||
print '====' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters